summaryrefslogtreecommitdiff
path: root/inc/mod.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2010-12-16 17:05:29 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2010-12-16 17:05:29 +1100
commitf45d3fdb32a932a7202c1e68331b442ae23d1a63 (patch)
tree2fa584e1885a0173f5392c3ac77be41b6f230fc2 /inc/mod.php
parenta395805e580e07edef1d47eea43daf3fd92880d3 (diff)
Check if post exists when deleting
Diffstat (limited to 'inc/mod.php')
-rw-r--r--inc/mod.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/inc/mod.php b/inc/mod.php
index 46d966fe..a6cf3793 100644
--- a/inc/mod.php
+++ b/inc/mod.php
@@ -152,6 +152,10 @@
$id
), $sql) or error(mysql_error($sql));
+ if(mysql_num_rows($post_res) < 1) {
+ error(ERROR_INVALIDPOST);
+ }
+
// Delete posts and maybe replies
while($post = mysql_fetch_array($post_res)) {