* @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 $post_id = (int) get_input('post'); $group_guid = (int) get_input('group'); $topic_guid = (int) get_input('topic'); if ($post = get_annotation($post_id)) { //check that the user can edit if ($post->canEdit()) { //delete $post->delete(); //display confirmation message system_message(elgg_echo("grouppost:deleted")); } } else { $url = ""; system_message(elgg_echo("grouppost:notdeleted")); } // Forward to the group forum page global $CONFIG; $url = $CONFIG->wwwroot . "mod/groups/topicposts.php?topic={$topic_guid}&group_guid={$group_guid}"; forward($url); ?>