From f251c2e03656d62349a5996a358862f7076d477a Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 26 Aug 2011 11:38:39 -0400 Subject: [PATCH] Explicit joins for people tags --- lib/peopletagnoticestream.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/peopletagnoticestream.php b/lib/peopletagnoticestream.php index 9477ca8ea6..e82d754e8d 100644 --- a/lib/peopletagnoticestream.php +++ b/lib/peopletagnoticestream.php @@ -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);