X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ftagcloudsection.php;h=268540cf9be4a97193035ea82d9919acd06ce6b7;hb=76babcb430e6fae9254541f5a26483e576dfe5f3;hp=ed84999f0c0e1cc6894215d0c7831f3f55aeb706;hpb=ae883ceb9b4689f6c1dd3aecdc4a844eda7d179a;p=quix0rs-gnu-social.git diff --git a/lib/tagcloudsection.php b/lib/tagcloudsection.php index ed84999f0c..268540cf9b 100644 --- a/lib/tagcloudsection.php +++ b/lib/tagcloudsection.php @@ -27,11 +27,11 @@ * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -define('TAGS_PER_SECTION', 20); +define('TAGS_PER_SECTION', 10); /** * Base class for sections @@ -45,15 +45,16 @@ define('TAGS_PER_SECTION', 20); * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class TagCloudSection extends Section { function showContent() { $tags = $this->getTags(); + //* NOISY-DEBUG: */ common_debug('[' . __METHOD__ . ':' . __LINE__ . '] tags[]=' . gettype($tags)); if (!$tags) { - $this->out->element('p', null, _('None')); + // TRANS: Content displayed in a tag cloud section if there are no tags. + $this->out->element('p', null, _m('NOTAGS','None')); return false; } @@ -63,12 +64,15 @@ 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) { - $this->out->element('p', null, _('(None)')); + // TRANS: Content displayed in a tag cloud section if there are no tags. + $this->out->element('p', null, _m('NOTAGS','None')); return false; }