X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ftagcloudsection.php;h=ca72a27e521b38f161eedfffbca8759e23f34317;hb=dd61ae8fbeee64c85f8186672292335592be1ff5;hp=24a3bd98af96bf6c2baac39b53630217efe06a50;hpb=cb183359e23ae7a5cfb483fa06c6c4b7a8b05fff;p=quix0rs-gnu-social.git diff --git a/lib/tagcloudsection.php b/lib/tagcloudsection.php index 24a3bd98af..ca72a27e52 100644 --- a/lib/tagcloudsection.php +++ b/lib/tagcloudsection.php @@ -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) {