aboutsummaryrefslogtreecommitdiff
path: root/mod/messages
diff options
context:
space:
mode:
Diffstat (limited to 'mod/messages')
-rw-r--r--mod/messages/manifest.xml2
-rw-r--r--mod/messages/pages/messages/read.php2
-rw-r--r--mod/messages/start.php10
-rw-r--r--mod/messages/views/default/forms/messages/process.php4
4 files changed, 7 insertions, 11 deletions
diff --git a/mod/messages/manifest.xml b/mod/messages/manifest.xml
index 73a58d9d4..6e3462901 100644
--- a/mod/messages/manifest.xml
+++ b/mod/messages/manifest.xml
@@ -6,8 +6,8 @@
<category>bundled</category>
<category>communication</category>
<description>Elgg internal messages plugin. This plugin lets user send each other messages.</description>
- <copyright>See COPYRIGHT.txt</copyright>
<website>http://www.elgg.org/</website>
+ <copyright>See COPYRIGHT.txt</copyright>
<license>GNU General Public License version 2</license>
<requires>
<type>elgg_release</type>
diff --git a/mod/messages/pages/messages/read.php b/mod/messages/pages/messages/read.php
index d41551be4..19e3ecdd7 100644
--- a/mod/messages/pages/messages/read.php
+++ b/mod/messages/pages/messages/read.php
@@ -9,7 +9,7 @@ gatekeeper();
$message = get_entity(get_input('guid'));
if (!$message) {
- forward();
+ forward('messages/inbox');
}
// mark the message as read
diff --git a/mod/messages/start.php b/mod/messages/start.php
index 1a2709324..2e61d6e21 100644
--- a/mod/messages/start.php
+++ b/mod/messages/start.php
@@ -356,16 +356,10 @@ function messages_count_unread() {
"msg_msg.name_id='{$map['msg']}' AND msg_msg.value_id='{$map[1]}'",
),
'owner_guid' => $user_guid,
- 'limit' => 0
+ 'count' => true,
);
- $num_messages = elgg_get_entities_from_metadata($options);
-
- if (is_array($num_messages)) {
- return sizeof($num_messages);
- }
-
- return 0;
+ return elgg_get_entities_from_metadata($options);
}
/**
diff --git a/mod/messages/views/default/forms/messages/process.php b/mod/messages/views/default/forms/messages/process.php
index f86c3217a..cb30792e9 100644
--- a/mod/messages/views/default/forms/messages/process.php
+++ b/mod/messages/views/default/forms/messages/process.php
@@ -19,10 +19,12 @@ echo $messages;
echo '</div>';
echo '<div class="elgg-foot messages-buttonbank">';
+
echo elgg_view('input/submit', array(
'value' => elgg_echo('delete'),
'name' => 'delete',
- 'class' => 'elgg-button-delete',
+ 'class' => 'elgg-button-delete elgg-requires-confirmation',
+ 'title' => elgg_echo('deleteconfirm:plural'),
));
if ($vars['folder'] == "inbox") {