diff options
author | Evan Prodromou <evan@status.net> | 2010-01-13 22:32:17 -0800 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-01-13 22:32:17 -0800 |
commit | 16742d0fde811256c386d1bae9768fcd939b9af8 (patch) | |
tree | 75731b9959f802171ace850588d25f8727cc041e | |
parent | abd67452dad9c0e53427731d96de15428a99b086 (diff) |
do since_id and max_id in inbox
-rw-r--r-- | classes/Inbox.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/classes/Inbox.php b/classes/Inbox.php index f3d4afca3..312b4586b 100644 --- a/classes/Inbox.php +++ b/classes/Inbox.php @@ -153,8 +153,19 @@ class Inbox extends Memcached_DataObject $ids = unpack('N*', $inbox->notice_ids); - // XXX: handle since_id - // XXX: handle max_id + if (!empty($since_id)) { + $i = array_search($since_id, $ids); + if ($i !== false) { + $ids = array_slice($ids, 0, $i - 1); + } + } + + if (!empty($max_id)) { + $i = array_search($max_id, $ids); + if ($i !== false) { + $ids = array_slice($ids, $i - 1); + } + } $ids = array_slice($ids, $offset, $limit); |