* @link http://status.net/
*/
-if (!defined('STATUSNET')) {
- // This check helps protect against security problems;
- // your code file can't be executed directly from the web.
- exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
/**
* Stream of notices for a list
*/
class PeopletagNoticeStream extends ScopingNoticeStream
{
- function __construct($plist, $profile = -1)
+ function __construct($plist, Profile $scoped=null)
{
- if (is_int($profile) && $profile == -1) {
- $profile = Profile::current();
- }
parent::__construct(new CachingNoticeStream(new RawPeopletagNoticeStream($plist),
'profile_list:notice_ids:' . $plist->id),
- $profile);
+ $scoped);
}
}
$notice->selectAdd();
$notice->selectAdd('notice.id');
+ $ptag = new Profile_tag();
+ $ptag->tag = $this->profile_list->tag;
+ $ptag->tagger = $this->profile_list->tagger;
$notice->joinAdd(array('profile_id', 'profile_tag:tagged'));
-
+ $notice->whereAdd('profile_tag.tagger = ' . $this->profile_list->tagger);
$notice->whereAdd(sprintf('profile_tag.tag = "%s"', $this->profile_list->tag));
- $notice->whereAdd(sprintf('profile_tag.tagger = %d', $this->profile_list->tagger));
if ($since_id != 0) {
$notice->whereAdd('notice.id > ' . $since_id);