diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-15 22:28:46 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-15 22:28:46 +0000 |
commit | 43c33492d2ab65a783c17559cf8dabd7832e9ea1 (patch) | |
tree | 7107fed1b5424db1405b842972c7e4c47f11bfd3 /mod/messages/actions/delete.php | |
parent | e8d148970261207efbe5435e1abcf68c5ed59cc8 (diff) | |
download | elgg-43c33492d2ab65a783c17559cf8dabd7832e9ea1.tar.gz elgg-43c33492d2ab65a783c17559cf8dabd7832e9ea1.tar.bz2 |
Updated the messages plugin to use the new CSS/HTML
git-svn-id: http://code.elgg.org/elgg/trunk@7886 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/messages/actions/delete.php')
-rw-r--r-- | mod/messages/actions/delete.php | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/mod/messages/actions/delete.php b/mod/messages/actions/delete.php deleted file mode 100644 index 4ccc1d2ba..000000000 --- a/mod/messages/actions/delete.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -/** -* Elgg delete a message action page -* It is worth noting that due to the nature of a messaging system and the fact 2 people access -* the same message, messages don't actually delete, they are just removed from view for the user who deletes -* -* @package ElggMessages -*/ - -// 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); -$type = get_input('type'); // sent message or inbox -$success = true; -$submit = get_input('submit'); -$offset = get_input('offset'); - -foreach($message_id_array as $message_id) { - -// get the message object - $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") { - - if ($submit == elgg_echo('delete')) { - if ($message->delete()) { - } else { - $success = false; - } - } else { - if ($message->readYet = 1) { - } else { - $success = false; - } - } - - }else{ - - // display the error message - $success = false; - - } - -} - -if ($success) { - if ($submit == elgg_echo('delete')) { - system_message(elgg_echo("messages:deleted")); - } else { - 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}"); - } -} else { - register_error(elgg_echo("messages:notfound")); - forward(REFERER); -}
\ No newline at end of file |