From: Evan Prodromou Date: Fri, 26 Aug 2011 15:38:39 +0000 (-0400) Subject: Explicit joins for people tags X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f251c2e03656d62349a5996a358862f7076d477a;p=quix0rs-gnu-social.git Explicit joins for people tags --- 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);