summaryrefslogtreecommitdiff
path: root/classes/User.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-02 13:38:10 -0800
committerBrion Vibber <brion@pobox.com>2010-03-02 13:38:10 -0800
commitddf3614c843bcd8d9ecfd0850ac9a8cefae6dbba (patch)
tree07b772b280e6f23761c0111d953b3c2f5b8d2120 /classes/User.php
parent8629664ed90ffb496f607d15491821217f6b3126 (diff)
parente9c127ddd869f44eafe7ae6b30d9dc69df8b863c (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'classes/User.php')
-rw-r--r--classes/User.php42
1 files changed, 17 insertions, 25 deletions
diff --git a/classes/User.php b/classes/User.php
index e0f0d87d1..357c1e501 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -457,28 +457,28 @@ class User extends Memcached_DataObject
return $user;
}
- function getReplies($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0, $since=null)
+ function getReplies($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0)
{
- $ids = Reply::stream($this->id, $offset, $limit, $since_id, $before_id, $since);
+ $ids = Reply::stream($this->id, $offset, $limit, $since_id, $before_id);
return Notice::getStreamByIds($ids);
}
- function getTaggedNotices($tag, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0, $since=null) {
+ function getTaggedNotices($tag, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0) {
$profile = $this->getProfile();
if (!$profile) {
return null;
} else {
- return $profile->getTaggedNotices($tag, $offset, $limit, $since_id, $before_id, $since);
+ return $profile->getTaggedNotices($tag, $offset, $limit, $since_id, $before_id);
}
}
- function getNotices($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0, $since=null)
+ function getNotices($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0)
{
$profile = $this->getProfile();
if (!$profile) {
return null;
} else {
- return $profile->getNotices($offset, $limit, $since_id, $before_id, $since);
+ return $profile->getNotices($offset, $limit, $since_id, $before_id);
}
}
@@ -488,24 +488,24 @@ class User extends Memcached_DataObject
return Notice::getStreamByIds($ids);
}
- function noticesWithFriends($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0, $since=null)
+ function noticesWithFriends($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0)
{
- return Inbox::streamNotices($this->id, $offset, $limit, $since_id, $before_id, $since, false);
+ return Inbox::streamNotices($this->id, $offset, $limit, $since_id, $before_id, false);
}
- function noticeInbox($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0, $since=null)
+ function noticeInbox($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0)
{
- return Inbox::streamNotices($this->id, $offset, $limit, $since_id, $before_id, $since, true);
+ return Inbox::streamNotices($this->id, $offset, $limit, $since_id, $before_id, true);
}
- function friendsTimeline($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0, $since=null)
+ function friendsTimeline($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0)
{
- return Inbox::streamNotices($this->id, $offset, $limit, $since_id, $before_id, $since, false);
+ return Inbox::streamNotices($this->id, $offset, $limit, $since_id, $before_id, false);
}
- function ownFriendsTimeline($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0, $since=null)
+ function ownFriendsTimeline($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0)
{
- return Inbox::streamNotices($this->id, $offset, $limit, $since_id, $before_id, $since, true);
+ return Inbox::streamNotices($this->id, $offset, $limit, $since_id, $before_id, true);
}
function blowFavesCache()
@@ -790,7 +790,7 @@ class User extends Memcached_DataObject
return Notice::getStreamByIds($ids);
}
- function _repeatedByMeDirect($offset, $limit, $since_id, $max_id, $since)
+ function _repeatedByMeDirect($offset, $limit, $since_id, $max_id)
{
$notice = new Notice();
@@ -814,10 +814,6 @@ class User extends Memcached_DataObject
$notice->whereAdd('id <= ' . $max_id);
}
- if (!is_null($since)) {
- $notice->whereAdd('created > \'' . date('Y-m-d H:i:s', $since) . '\'');
- }
-
$ids = array();
if ($notice->find()) {
@@ -837,12 +833,12 @@ class User extends Memcached_DataObject
$ids = Notice::stream(array($this, '_repeatsOfMeDirect'),
array(),
'user:repeats_of_me:'.$this->id,
- $offset, $limit, $since_id, $max_id, null);
+ $offset, $limit, $since_id, $max_id);
return Notice::getStreamByIds($ids);
}
- function _repeatsOfMeDirect($offset, $limit, $since_id, $max_id, $since)
+ function _repeatsOfMeDirect($offset, $limit, $since_id, $max_id)
{
$qry =
'SELECT DISTINCT original.id AS id ' .
@@ -857,10 +853,6 @@ class User extends Memcached_DataObject
$qry .= 'AND original.id <= ' . $max_id . ' ';
}
- if (!is_null($since)) {
- $qry .= 'AND original.modified > \'' . date('Y-m-d H:i:s', $since) . '\' ';
- }
-
// NOTE: we sort by fave time, not by notice time!
$qry .= 'ORDER BY original.id DESC ';