diff options
author | Nicolas BERNSTEIN <alexis211@gmail.com> | 2012-04-13 19:17:17 +0200 |
---|---|---|
committer | Nicolas BERNSTEIN <alexis211@gmail.com> | 2012-04-13 19:17:17 +0200 |
commit | a535a9e7e017629178b45acc2e96e1d674a0d6fc (patch) | |
tree | b983c468aa37422bb58ff560b91eed067ca1a96e /lib/blog/delcom.php | |
parent | ccff9ce8d8a2818699ce4e20a310986fc95ea022 (diff) | |
download | Bits-a535a9e7e017629178b45acc2e96e1d674a0d6fc.tar.gz Bits-a535a9e7e017629178b45acc2e96e1d674a0d6fc.zip |
Added : ATOM feed for blog ; abilty to comment posts.
Diffstat (limited to 'lib/blog/delcom.php')
-rw-r--r-- | lib/blog/delcom.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/blog/delcom.php b/lib/blog/delcom.php new file mode 100644 index 0000000..eaf93ec --- /dev/null +++ b/lib/blog/delcom.php @@ -0,0 +1,12 @@ +<?php + +assert_redir(count($args) >= 3, 'blog'); +$comid = intval($args[2]); + +$com = mysql_fetch_assoc(sql("SELECT post FROM blog_comments WHERE id = $comid")); +assert_error($com, + "This comment does not exist."); + +token_validate("Do you really want to delete this comment ?", "view-blog-" . $com['post']); +sql("DELETE FROM blog_comments WHERE id = $comid"); +header("Location: view-blog-" . $com['post']); |