$sum = 0;
while ($tags->fetch() && ++$cnt <= TAGS_PER_SECTION) {
+ // Check scope of tag to current profile (including guests)
if ($tags->isCurrentProfileInScope()) {
$tw[$tags->tag] = $tags->weight;
$sum += $tags->weight;
function tagUrl($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));
+ if ($this->out instanceof ShowstreamAction) {
+ return common_local_url('showstream', array('nickname' => $this->out->getTarget()->getNickname(), 'tag' => $tag));
}
+ return common_local_url('tag', array('tag' => $tag));
}
function divId()