]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/tagcloudsection.php
Merge branch 'fixes/private_scope_on_tags' into social-master
[quix0rs-gnu-social.git] / lib / tagcloudsection.php
index 24a3bd98af96bf6c2baac39b53630217efe06a50..ca72a27e521b38f161eedfffbca8759e23f34317 100644 (file)
@@ -51,7 +51,7 @@ class TagCloudSection extends Section
     {
         $tags = $this->getTags();
 
-        if (!$tags) {
+        if (!$tags instanceof Notice_tag) {
             // TRANS: Content displayed in a tag cloud section if there are no tags.
             $this->out->element('p', null, _m('NOTAGS','None'));
             return false;
@@ -63,8 +63,10 @@ class TagCloudSection extends Section
         $sum = 0;
 
         while ($tags->fetch() && ++$cnt <= TAGS_PER_SECTION) {
-            $tw[$tags->tag] = $tags->weight;
-            $sum += $tags->weight;
+            if ($tags->isCurrentProfileInScope()) {
+                $tw[$tags->tag] = $tags->weight;
+                $sum += $tags->weight;
+            }
         }
 
         if ($cnt == 0) {