From 1a08a1f4a273737afb508c781d5f39cef021a273 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 15 May 2008 13:35:37 +0000 Subject: Moving some stuff into the plugins repo, where it belongs. git-svn-id: https://code.elgg.org/elgg/trunk@646 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/blog/actions/comments/add.php | 44 ------------------------------------ mod/blog/actions/comments/delete.php | 34 ---------------------------- 2 files changed, 78 deletions(-) delete mode 100644 mod/blog/actions/comments/add.php delete mode 100644 mod/blog/actions/comments/delete.php (limited to 'mod/blog/actions/comments') diff --git a/mod/blog/actions/comments/add.php b/mod/blog/actions/comments/add.php deleted file mode 100644 index 8a54cde13..000000000 --- a/mod/blog/actions/comments/add.php +++ /dev/null @@ -1,44 +0,0 @@ - - * @copyright Curverider Ltd 2008 - * @link http://elgg.org/ - */ - - // Make sure we're logged in; forward to the front page if not - if (!isloggedin()) forward(); - - // Get input - $blogpost_guid = (int) get_input('blogpost_guid'); - $comment = get_input('comment'); - - // Let's see if we can get an entity with the specified GUID, and that it's a blog post - if ($blogpost = get_entity($blogpost_guid)) { - if ($blogpost->getSubtype() == "blog") { - - // If posting the comment was successful, say so - if ($blogpost->annotate('comment',$comment,$blogpost->access_id, $_SESSION['guid'])) { - - system_message(elgg_echo("comment:success")); - - } else { - system_message(elgg_echo("comment:failure")); - } - - } - - } else { - - system_message(elgg_echo("blog:notfound")); - - } - - // Forward to the - forward("mod/blog/read.php?blogpost=" . $blogpost_guid); - -?> \ No newline at end of file diff --git a/mod/blog/actions/comments/delete.php b/mod/blog/actions/comments/delete.php deleted file mode 100644 index 8eee2c961..000000000 --- a/mod/blog/actions/comments/delete.php +++ /dev/null @@ -1,34 +0,0 @@ - - * @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