summaryrefslogtreecommitdiff
path: root/classes/Profile.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-02 11:54:02 -0800
committerBrion Vibber <brion@pobox.com>2010-03-02 11:54:02 -0800
commit6b134ae4c7e15ce9853bc82545c3beb67a2dfdad (patch)
treec28f2857d42b6bc97f602fe4c3458a5dd2ca9bc2 /classes/Profile.php
parentf596e072e79ec87541b27008ea2327275e5fc669 (diff)
Dropped deprecated timestamp-based 'since' parameter for all API methods. When it sneaks in it can cause some very slow queries due to mismatches with the indexing.
Twitter removed 'since' support some time ago, and we've already removed it from the public timeline, so it shouldn't be missed.
Diffstat (limited to 'classes/Profile.php')
-rw-r--r--classes/Profile.php20
1 files changed, 6 insertions, 14 deletions
diff --git a/classes/Profile.php b/classes/Profile.php
index 78223b34a..470ef3320 100644
--- a/classes/Profile.php
+++ b/classes/Profile.php
@@ -163,27 +163,27 @@ class Profile extends Memcached_DataObject
return null;
}
- function getTaggedNotices($tag, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0, $since=null)
+ function getTaggedNotices($tag, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0)
{
$ids = Notice::stream(array($this, '_streamTaggedDirect'),
array($tag),
'profile:notice_ids_tagged:' . $this->id . ':' . $tag,
- $offset, $limit, $since_id, $max_id, $since);
+ $offset, $limit, $since_id, $max_id);
return Notice::getStreamByIds($ids);
}
- function getNotices($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0, $since=null)
+ 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, $max_id, $since);
+ $offset, $limit, $since_id, $max_id);
return Notice::getStreamByIds($ids);
}
- function _streamTaggedDirect($tag, $offset, $limit, $since_id, $max_id, $since)
+ function _streamTaggedDirect($tag, $offset, $limit, $since_id, $max_id)
{
// XXX It would be nice to do this without a join
@@ -202,10 +202,6 @@ class Profile extends Memcached_DataObject
$query .= " and id < $max_id";
}
- if (!is_null($since)) {
- $query .= " and created > '" . date('Y-m-d H:i:s', $since) . "'";
- }
-
$query .= ' order by id DESC';
if (!is_null($offset)) {
@@ -223,7 +219,7 @@ class Profile extends Memcached_DataObject
return $ids;
}
- function _streamDirect($offset, $limit, $since_id, $max_id, $since = null)
+ function _streamDirect($offset, $limit, $since_id, $max_id)
{
$notice = new Notice();
@@ -240,10 +236,6 @@ class Profile extends Memcached_DataObject
$notice->whereAdd('id <= ' . $max_id);
}
- if (!is_null($since)) {
- $notice->whereAdd('created > \'' . date('Y-m-d H:i:s', $since) . '\'');
- }
-
$notice->orderBy('id DESC');
if (!is_null($offset)) {