X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ftagcloudsection.php;h=692f5d96620a86f904f166986f370ff49e3ae4a8;hb=f68d4e7d061f33cffbcf685949f3116237c23e55;hp=a46c7384687098d3ec0c0aff6c441b664beb8fb6;hpb=a130bb9d6da4b1b01a3ff9b0c674494dd465d512;p=quix0rs-gnu-social.git diff --git a/lib/tagcloudsection.php b/lib/tagcloudsection.php index a46c738468..692f5d9662 100644 --- a/lib/tagcloudsection.php +++ b/lib/tagcloudsection.php @@ -1,6 +1,6 @@ . * * @category Widget - * @package Laconica - * @author Evan Prodromou - * @copyright 2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @copyright 2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -40,10 +40,10 @@ define('TAGS_PER_SECTION', 20); * group, or site. * * @category Widget - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ class TagCloudSection extends Section @@ -76,7 +76,7 @@ class TagCloudSection extends Section $this->out->elementStart('ul', 'tags xoxo tag-cloud'); foreach ($tw as $tag => $weight) { - $this->showTag($tag, $weight, ($sum == 0) ? $weight : $weight/$sum); + $this->showTag($tag, $weight, ($sum == 0) ? 0 : $weight/$sum); } $this->out->elementEnd('ul'); @@ -114,7 +114,11 @@ class TagCloudSection extends Section function tagUrl($tag) { - return common_local_url('tag', array('tag' => $tag)); + if ('showstream' === $this->out->trimmed('action')) { + return common_local_url('showstream', array('nickname' => $this->out->profile->nickname, 'tag' => $tag)); + } else { + return common_local_url('tag', array('tag' => $tag)); + } } function divId()