X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ftagnoticestream.php;h=5a99a1aa68a0b30faf7cc6b2ae0f0f371941ce40;hb=f134a423f6a9e7bb61d069c4d6281c05417bbd45;hp=3d81f7415ad1bed4d18acb5f23c21dfc47fc79dd;hpb=e2a090c9cc796bc5116972a5e3aae2af9e391993;p=quix0rs-gnu-social.git diff --git a/lib/tagnoticestream.php b/lib/tagnoticestream.php index 3d81f7415a..5a99a1aa68 100644 --- a/lib/tagnoticestream.php +++ b/lib/tagnoticestream.php @@ -43,13 +43,11 @@ if (!defined('GNUSOCIAL')) { exit(1); } class TagNoticeStream extends ScopingNoticeStream { - function __construct($tag, $profile = -1) + function __construct($tag, Profile $scoped=null) { - if (is_int($profile) && $profile == -1) { - $profile = Profile::current(); - } parent::__construct(new CachingNoticeStream(new RawTagNoticeStream($tag), - 'notice_tag:notice_ids:' . Cache::keyize($tag))); + 'notice_tag:notice_ids:' . Cache::keyize($tag)), + $scoped); } } @@ -101,7 +99,7 @@ class RawTagNoticeStream extends NoticeStream } } - $nt->orderBy('created DESC, notice_id DESC'); + $nt->orderBy('notice.created DESC, notice_id DESC'); if (!is_null($offset)) { $nt->limit($offset, $limit);