aboutsummaryrefslogtreecommitdiff
path: root/mod/messages
diff options
context:
space:
mode:
Diffstat (limited to 'mod/messages')
-rw-r--r--mod/messages/index.php3
-rw-r--r--mod/messages/sent.php5
2 files changed, 5 insertions, 3 deletions
diff --git a/mod/messages/index.php b/mod/messages/index.php
index 97c1cfff4..28a874635 100644
--- a/mod/messages/index.php
+++ b/mod/messages/index.php
@@ -22,6 +22,7 @@ $page_owner = get_loggedin_user();
set_page_owner($page_owner->getGUID());
// Get the user's inbox, this will be all messages where the 'toId' field matches their guid
+// @todo - fix hack where limit + 1 messages are requested
$messages = elgg_get_entities_from_metadata(array(
'type' => 'object',
'subtype' => 'messages',
@@ -49,4 +50,4 @@ $body = elgg_view_layout("one_column_with_sidebar", $area2);
// Draw page
-page_draw(sprintf(elgg_echo('messages:user'),$page_owner->name),$body); \ No newline at end of file
+page_draw(sprintf(elgg_echo('messages:user'),$page_owner->name),$body);
diff --git a/mod/messages/sent.php b/mod/messages/sent.php
index 4f432b47f..6aea2e561 100644
--- a/mod/messages/sent.php
+++ b/mod/messages/sent.php
@@ -25,7 +25,8 @@ $offset = get_input('offset',0);
$limit = 10;
// Display all the messages a user owns, these will make up the sentbox
-$messages = elgg_get_entities_from_metadata(array('metadata_name' => 'fromId', 'metadata_value' => $_SESSION['user']->guid, 'types' => 'object', 'subtypes' => 'messages', 'owner_guid' => $page_owner->guid, 'limit' => $limit, 'offset' => $offset));
+// @todo - fix hack where limit + 1 is passed
+$messages = elgg_get_entities_from_metadata(array('metadata_name' => 'fromId', 'metadata_value' => $_SESSION['user']->guid, 'types' => 'object', 'subtypes' => 'messages', 'owner_guid' => $page_owner->guid, 'limit' => $limit + 1, 'offset' => $offset));
// Set the page title
@@ -40,4 +41,4 @@ $area2 .= elgg_view("messages/forms/view",array('entity' => $messages, 'page_vie
$body = elgg_view_layout("one_column_with_sidebar", $area2);
// Draw page
-page_draw(sprintf(elgg_echo('messages:sentMessages'),$page_owner->name),$body); \ No newline at end of file
+page_draw(sprintf(elgg_echo('messages:sentMessages'),$page_owner->name),$body);