aboutsummaryrefslogtreecommitdiff
path: root/mod/messages
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-07-11 21:19:14 +0200
committerSem <sembrestels@riseup.net>2012-07-11 21:19:14 +0200
commitb83574ae1b8ada2bb9c2247492806473df920259 (patch)
tree30f9010da3cab12bda4921f079cfe86fcef2e7a4 /mod/messages
parent46bd104bd523c08ff2f6bc0342be9ae1251259e8 (diff)
parent4d42fd0263948eee4a7c7a26ceca0647c01cce32 (diff)
downloadelgg-b83574ae1b8ada2bb9c2247492806473df920259.tar.gz
elgg-b83574ae1b8ada2bb9c2247492806473df920259.tar.bz2
Merge tag '1.8.8' of git://github.com/Elgg/Elgg into lorea-preprod
Elgg 1.8.8 release Conflicts: js/lib/languages.js
Diffstat (limited to 'mod/messages')
-rw-r--r--mod/messages/pages/messages/read.php2
-rw-r--r--mod/messages/start.php10
2 files changed, 3 insertions, 9 deletions
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);
}
/**