X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FNotice_tag.php;h=ea38bb3502f86d47e8a0aeec5c3affd8af41ee8f;hb=bf59eaf602c8319d5ae99d9809b4d4867cb632cd;hp=4fd76e8ea85e8c04c9119b370bf3c89a462d7dec;hpb=663e4e02a1b3b1c104c2c3db19e524a486c3d981;p=quix0rs-gnu-social.git diff --git a/classes/Notice_tag.php b/classes/Notice_tag.php index 4fd76e8ea8..ea38bb3502 100644 --- a/classes/Notice_tag.php +++ b/classes/Notice_tag.php @@ -40,13 +40,13 @@ class Notice_tag extends Memcached_DataObject $ids = Notice::stream(array('Notice_tag', '_streamDirect'), array($tag), - 'notice_tag:notice_ids:' . common_keyize($tag), + 'notice_tag:notice_ids:' . Cache::keyize($tag), $offset, $limit); return Notice::getStreamByIds($ids); } - function _streamDirect($tag, $offset, $limit, $since_id, $max_id, $since) + function _streamDirect($tag, $offset, $limit, $since_id, $max_id) { $nt = new Notice_tag(); @@ -60,11 +60,7 @@ class Notice_tag extends Memcached_DataObject } if ($max_id != 0) { - $nt->whereAdd('notice_id < ' . $max_id); - } - - if (!is_null($since)) { - $nt->whereAdd('created > \'' . date('Y-m-d H:i:s', $since) . '\''); + $nt->whereAdd('notice_id <= ' . $max_id); } $nt->orderBy('notice_id DESC'); @@ -86,9 +82,9 @@ class Notice_tag extends Memcached_DataObject function blowCache($blowLast=false) { - self::blow('notice_tag:notice_ids:%s', common_keyize($this->tag)); + self::blow('notice_tag:notice_ids:%s', Cache::keyize($this->tag)); if ($blowLast) { - self::blow('notice_tag:notice_ids:%s;last', common_keyize($this->tag)); + self::blow('notice_tag:notice_ids:%s;last', Cache::keyize($this->tag)); } }