]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/popularity.php
Update/fix translator documentation.
[quix0rs-gnu-social.git] / lib / popularity.php
index c5b795b8d251f0b0e015c9d45a4764b4827aac7b..7ab259a391b28433ea84c40bb4d53ef7bfcb5451 100644 (file)
@@ -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;