From a9e67905b90320bf8566b6919b5edb3354d7fd6d Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 15 Apr 2008 15:35:35 +0000 Subject: Blog plugin improvements, including delete on comments git-svn-id: https://code.elgg.org/elgg/trunk@466 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/blog/actions/comments/delete.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 mod/blog/actions/comments/delete.php (limited to 'mod/blog/actions/comments') diff --git a/mod/blog/actions/comments/delete.php b/mod/blog/actions/comments/delete.php new file mode 100644 index 000000000..8eee2c961 --- /dev/null +++ b/mod/blog/actions/comments/delete.php @@ -0,0 +1,34 @@ + + * @copyright Curverider Ltd 2008 + * @link http://elgg.org/ + */ + + // Ensure we're logged in + if (!isloggedin()) forward(); + + // Make sure we can get the comment in question + $comment_id = (int) get_input('comment_id'); + if ($comment = get_annotation($comment_id)) { + + $url = "mod/blog/read.php?blogpost=" . $comment->entity_guid; + if ($comment->canEdit()) { + $comment->delete(); + system_message(elgg_echo("comment:deleted")); + forward($url); + } + + } else { + $url = ""; + } + + system_message(elgg_echo("comment:notdeleted")); + forward($url); + +?> \ No newline at end of file -- cgit v1.2.3