summaryrefslogtreecommitdiff
path: root/lib/blog/delete.php
diff options
context:
space:
mode:
authorNicolas BERNSTEIN <alexis211@gmail.com>2012-04-13 19:17:17 +0200
committerNicolas BERNSTEIN <alexis211@gmail.com>2012-04-13 19:17:17 +0200
commita535a9e7e017629178b45acc2e96e1d674a0d6fc (patch)
treeb983c468aa37422bb58ff560b91eed067ca1a96e /lib/blog/delete.php
parentccff9ce8d8a2818699ce4e20a310986fc95ea022 (diff)
downloadBits-a535a9e7e017629178b45acc2e96e1d674a0d6fc.tar.gz
Bits-a535a9e7e017629178b45acc2e96e1d674a0d6fc.zip
Added : ATOM feed for blog ; abilty to comment posts.
Diffstat (limited to 'lib/blog/delete.php')
-rw-r--r--lib/blog/delete.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/blog/delete.php b/lib/blog/delete.php
index a57b5ac..bfc428b 100644
--- a/lib/blog/delete.php
+++ b/lib/blog/delete.php
@@ -5,9 +5,10 @@ $postid = intval($args[2]);
$post = mysql_fetch_assoc(sql("SELECT owner FROM blog_posts WHERE id = $postid"));
assert_error($post && $post['owner'] == $user['id'],
- "This note does not exist, or you are not allowed to delete it.");
+ "This post does not exist, or you are not allowed to delete it.");
token_validate("Do you really want to delete this post ?", "blog");
sql("DELETE FROM blog_posts WHERE id = $postid");
sql("DELETE FROM blog_tags WHERE post = $postid");
+sql("DELETE FROM blog_comments WHERE post = $postid");
header("Location: drafts-blog");