diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-02 13:38:10 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-02 13:38:10 -0800 |
commit | ddf3614c843bcd8d9ecfd0850ac9a8cefae6dbba (patch) | |
tree | 07b772b280e6f23761c0111d953b3c2f5b8d2120 /classes/Notice.php | |
parent | 8629664ed90ffb496f607d15491821217f6b3126 (diff) | |
parent | e9c127ddd869f44eafe7ae6b30d9dc69df8b863c (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'classes/Notice.php')
-rw-r--r-- | classes/Notice.php | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/classes/Notice.php b/classes/Notice.php index 3702dbcfa..63dc96897 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -559,17 +559,17 @@ class Notice extends Memcached_DataObject } } - function publicStream($offset=0, $limit=20, $since_id=0, $max_id=0, $since=null) + function publicStream($offset=0, $limit=20, $since_id=0, $max_id=0) { $ids = Notice::stream(array('Notice', '_publicStreamDirect'), array(), 'public', - $offset, $limit, $since_id, $max_id, $since); + $offset, $limit, $since_id, $max_id); return Notice::getStreamByIds($ids); } - function _publicStreamDirect($offset=0, $limit=20, $since_id=0, $max_id=0, $since=null) + function _publicStreamDirect($offset=0, $limit=20, $since_id=0, $max_id=0) { $notice = new Notice(); @@ -598,10 +598,6 @@ class Notice 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()) { @@ -616,17 +612,17 @@ class Notice extends Memcached_DataObject return $ids; } - function conversationStream($id, $offset=0, $limit=20, $since_id=0, $max_id=0, $since=null) + function conversationStream($id, $offset=0, $limit=20, $since_id=0, $max_id=0) { $ids = Notice::stream(array('Notice', '_conversationStreamDirect'), array($id), 'notice:conversation_ids:'.$id, - $offset, $limit, $since_id, $max_id, $since); + $offset, $limit, $since_id, $max_id); return Notice::getStreamByIds($ids); } - function _conversationStreamDirect($id, $offset=0, $limit=20, $since_id=0, $max_id=0, $since=null) + function _conversationStreamDirect($id, $offset=0, $limit=20, $since_id=0, $max_id=0) { $notice = new Notice(); @@ -649,10 +645,6 @@ class Notice 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()) { @@ -1134,7 +1126,6 @@ class Notice extends Memcached_DataObject } $xs->element('title', null, $this->content); - $xs->element('summary', null, $this->content); $xs->raw($profile->asAtomAuthor()); $xs->raw($profile->asActivityActor()); @@ -1270,16 +1261,16 @@ class Notice extends Memcached_DataObject } } - function stream($fn, $args, $cachekey, $offset=0, $limit=20, $since_id=0, $max_id=0, $since=null) + function stream($fn, $args, $cachekey, $offset=0, $limit=20, $since_id=0, $max_id=0) { $cache = common_memcache(); if (empty($cache) || - $since_id != 0 || $max_id != 0 || (!is_null($since) && $since > 0) || + $since_id != 0 || $max_id != 0 || is_null($limit) || ($offset + $limit) > NOTICE_CACHE_WINDOW) { return call_user_func_array($fn, array_merge($args, array($offset, $limit, $since_id, - $max_id, $since))); + $max_id))); } $idkey = common_cache_key($cachekey); |