]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Ticket 2895: exclude silenced users from popular notice lists
authorBrion Vibber <brion@pobox.com>
Tue, 16 Nov 2010 19:13:52 +0000 (11:13 -0800)
committerBrion Vibber <brion@pobox.com>
Tue, 16 Nov 2010 19:13:52 +0000 (11:13 -0800)
lib/popularity.php

index c5b795b8d251f0b0e015c9d45a4764b4827aac7b..b6987138b559e6cce4141ccf187e74005bf5d29b 100644 (file)
@@ -76,6 +76,7 @@ class Popularity
                 'notice.rendered,notice.url,notice.created,notice.modified,' .
                 'notice.reply_to,notice.is_local,notice.source,notice.conversation, ' .
                 'notice.lat,notice.lon,location_id,location_ns,notice.repeat_of';
+        $qry .= ' HAVING \'silenced\' NOT IN (SELECT role FROM profile_role WHERE profile_id=notice.profile_id)';
         $qry .= ' ORDER BY weight DESC';
 
         $offset = $this->offset;