X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fpopularity.php;h=7ab259a391b28433ea84c40bb4d53ef7bfcb5451;hb=f68d4e7d061f33cffbcf685949f3116237c23e55;hp=c5b795b8d251f0b0e015c9d45a4764b4827aac7b;hpb=9b9db3b28aa117085385baa264ba6d8bb928cfac;p=quix0rs-gnu-social.git diff --git a/lib/popularity.php b/lib/popularity.php index c5b795b8d2..7ab259a391 100644 --- a/lib/popularity.php +++ b/lib/popularity.php @@ -53,12 +53,12 @@ class Popularity { // @fixme there should be a common func for this if (common_config('db', 'type') == 'pgsql') { - if (!empty($this->out->tag)) { - $tag = pg_escape_string($this->out->tag); + if (!empty($this->tag)) { + $tag = pg_escape_string($this->tag); } } else { - if (!empty($this->out->tag)) { - $tag = mysql_escape_string($this->out->tag); + if (!empty($this->tag)) { + $tag = mysql_escape_string($this->tag); } } $weightexpr = common_sql_weight('fave.modified', common_config('popular', 'dropoff')); @@ -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;