* @link http://status.net/
*/
-if (!defined('STATUSNET')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
-define('TAGS_PER_SECTION', 20);
+define('TAGS_PER_SECTION', 10);
/**
* Base class for sections
* @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;
}
$sum = 0;
while ($tags->fetch() && ++$cnt <= TAGS_PER_SECTION) {
- $tw[$tags->tag] = $tags->weight;
- $sum += $tags->weight;
+ // Check scope of tag to current profile (including guests)
+ 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;
}