summaryrefslogtreecommitdiff
path: root/classes/Inbox.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/Inbox.php')
-rw-r--r--classes/Inbox.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/classes/Inbox.php b/classes/Inbox.php
index de48d7381..610b5fceb 100644
--- a/classes/Inbox.php
+++ b/classes/Inbox.php
@@ -56,7 +56,7 @@ class Inbox extends Memcached_DataObject
$inbox = new Inbox();
$inbox->query(sprintf('UPDATE inbox '.
- 'set notice_ids = concat(cast(%08x as binary(4)), '.
+ 'set notice_ids = concat(cast(0x%08x as binary(4)), '.
'substr(notice_ids, 1, 4092)) '.
'WHERE user_id = %d',
$notice_id, $user_id));
@@ -77,7 +77,7 @@ class Inbox extends Memcached_DataObject
$inbox = new Inbox();
$inbox->query(sprintf('UPDATE inbox '.
- 'set notice_ids = concat(cast(%08x as binary(4)), '.
+ 'set notice_ids = concat(cast(0x%08x as binary(4)), '.
'substr(notice_ids, 1, 4092)) '.
'WHERE user_id in (%s)',
$notice_id, implode(',', $boxcar)));
@@ -94,11 +94,13 @@ class Inbox extends Memcached_DataObject
return array();
}
- $ids = unpack('L*', $inbox->notice_ids);
+ $ids = unpack('N*', $inbox->notice_ids);
// XXX: handle since_id
// XXX: handle max_id
$ids = array_slice($ids, $offset, $limit);
+
+ return $ids;
}
}