Explicit joins for people tags

This commit is contained in:
Evan Prodromou 2011-08-26 11:38:39 -04:00
parent 04dccad3bb
commit f251c2e036

View File

@ -96,10 +96,10 @@ class RawPeopletagNoticeStream extends NoticeStream
$notice->selectAdd();
$notice->selectAdd('notice.id');
$ptag = new Profile_tag();
$ptag->tag = $this->profile_list->tag;
$ptag->tagger = $this->profile_list->tagger;
$notice->joinAdd($ptag);
$notice->joinAdd(array('profile_id', 'profile_tag:tagged'));
$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);