]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/tagcloudsection.php
Merge branch '0.7.x' into 0.8.x
[quix0rs-gnu-social.git] / lib / tagcloudsection.php
index 178dd88ca7399fb9ff0fc330455d35383e0e9eef..62f7d8961282659f7c12a4b0db2b57840cfc74da 100644 (file)
@@ -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, $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()