X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ftagcloudsection.php;h=ca72a27e521b38f161eedfffbca8759e23f34317;hb=dd61ae8fbeee64c85f8186672292335592be1ff5;hp=561ffb077f6f8068496dbcbcf3040109397ddad3;hpb=57198a74647f8350db4de03b0b7ef157091a4359;p=quix0rs-gnu-social.git diff --git a/lib/tagcloudsection.php b/lib/tagcloudsection.php index 561ffb077f..ca72a27e52 100644 --- a/lib/tagcloudsection.php +++ b/lib/tagcloudsection.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -define('TAGS_PER_SECTION', 20); +define('TAGS_PER_SECTION', 10); /** * Base class for sections @@ -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) {