]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Explicit joins for people tags
authorEvan Prodromou <evan@status.net>
Fri, 26 Aug 2011 15:38:39 +0000 (11:38 -0400)
committerEvan Prodromou <evan@status.net>
Fri, 26 Aug 2011 15:38:39 +0000 (11:38 -0400)
lib/peopletagnoticestream.php

index 9477ca8ea6dfc5f0cf52d06131c2461f01866d3b..e82d754e8d63e4da324630eac6facad37df8ad64 100644 (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);