summaryrefslogtreecommitdiff
path: root/classes/Profile.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-05-29 16:54:24 -0700
committerZach Copley <zach@controlyourself.ca>2009-05-29 16:54:24 -0700
commit425f9d703c5258920079b268c085b0c7112c3b70 (patch)
tree53b9a2f06accae2bd7fa71e172c09ba4c61793a9 /classes/Profile.php
parenteb76a3bbb36e1f73007cb9b602001ec14f6853c6 (diff)
Ticket #1567 - Change max_id to return notices <= ID instead of < ID
Diffstat (limited to 'classes/Profile.php')
-rw-r--r--classes/Profile.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/classes/Profile.php b/classes/Profile.php
index ae5641d79..3d13cd46a 100644
--- a/classes/Profile.php
+++ b/classes/Profile.php
@@ -153,18 +153,18 @@ class Profile extends Memcached_DataObject
return null;
}
- function getNotices($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0)
+ function getNotices($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0)
{
// XXX: I'm not sure this is going to be any faster. It probably isn't.
$ids = Notice::stream(array($this, '_streamDirect'),
array(),
'profile:notice_ids:' . $this->id,
- $offset, $limit, $since_id, $before_id);
+ $offset, $limit, $since_id, $max_id);
return Notice::getStreamByIds($ids);
}
- function _streamDirect($offset, $limit, $since_id, $before_id, $since)
+ function _streamDirect($offset, $limit, $since_id, $max_id, $since)
{
$notice = new Notice();
@@ -177,8 +177,8 @@ class Profile extends Memcached_DataObject
$notice->whereAdd('id > ' . $since_id);
}
- if ($before_id != 0) {
- $notice->whereAdd('id < ' . $before_id);
+ if ($max_id != 0) {
+ $notice->whereAdd('id <= ' . $max_id);
}
if (!is_null($since)) {