]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/tagcloudsection.php
No more needed (for this fix) but maybe later. So I always only comment them out.
[quix0rs-gnu-social.git] / lib / tagcloudsection.php
index 24a3bd98af96bf6c2baac39b53630217efe06a50..268540cf9be4a97193035ea82d9919acd06ce6b7 100644 (file)
@@ -50,6 +50,7 @@ class TagCloudSection extends Section
     function showContent()
     {
         $tags = $this->getTags();
+        //* NOISY-DEBUG: */ common_debug('[' . __METHOD__ . ':' . __LINE__ . '] tags[]=' . gettype($tags));
 
         if (!$tags) {
             // TRANS: Content displayed in a tag cloud section if there are no tags.
@@ -63,8 +64,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) {