diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-24 01:49:54 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-24 01:49:54 +0000 |
commit | 5003371ec531296d6aa60156b16199df33395bdf (patch) | |
tree | d2741ab131630fdff04b40d4ea9899d45f191843 /mod/messages/actions | |
parent | 38f3674095d16bfb73320eb2e0b566ad4484882d (diff) | |
download | elgg-5003371ec531296d6aa60156b16199df33395bdf.tar.gz elgg-5003371ec531296d6aa60156b16199df33395bdf.tar.bz2 |
Refs #2451: Removes (admin_)gatekeeper() calls from core plugin actions
git-svn-id: http://code.elgg.org/elgg/trunk@7434 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/messages/actions')
-rw-r--r-- | mod/messages/actions/delete.php | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/mod/messages/actions/delete.php b/mod/messages/actions/delete.php index d59aff025..4ccc1d2ba 100644 --- a/mod/messages/actions/delete.php +++ b/mod/messages/actions/delete.php @@ -7,9 +7,6 @@ * @package ElggMessages */ -// Need to be logged in to do this -gatekeeper(); - // grab details sent from the form $message_id_array = get_input('message_id'); if (!is_array($message_id_array)) $message_id_array = array($message_id_array); @@ -21,8 +18,8 @@ $offset = get_input('offset'); foreach($message_id_array as $message_id) { // get the message object - $message = get_entity($message_id); - + $message = get_entity($message_id); + // Make sure we actually have permission to edit and that the object is of sub-type messages if ($message && $message->getSubtype() == "messages") { @@ -37,11 +34,11 @@ foreach($message_id_array as $message_id) { $success = false; } } - - }else{ - - // display the error message - $success = false; + + }else{ + + // display the error message + $success = false; } @@ -54,11 +51,11 @@ if ($success) { system_message(elgg_echo("messages:markedread")); } // check to see if it is a sent message to be deleted - if($type == 'sent'){ - forward("mod/messages/sent.php?offset={$offset}"); - }else{ - forward("mod/messages/?username=" . get_loggedin_user()->username . "&offset={$offset}"); - } + if($type == 'sent'){ + forward("mod/messages/sent.php?offset={$offset}"); + }else{ + forward("mod/messages/?username=" . get_loggedin_user()->username . "&offset={$offset}"); + } } else { register_error(elgg_echo("messages:notfound")); forward(REFERER); |