]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
In single-user mode, link #hashtags to the user's tagged stream rather than the globa...
authorBrion Vibber <brion@pobox.com>
Thu, 8 Apr 2010 20:12:14 +0000 (13:12 -0700)
committerBrion Vibber <brion@pobox.com>
Fri, 9 Apr 2010 00:06:25 +0000 (17:06 -0700)
Previously they would end up pointing to the home URL.

lib/util.php

index 795997868305ff09b2ada3614cf7a9a8d1089cf3..e37df63484645feb9aa8dc540d1d4b1346823e50 100644 (file)
@@ -862,7 +862,14 @@ function common_xml_safe_str($str)
 function common_tag_link($tag)
 {
     $canonical = common_canonical_tag($tag);
-    $url = common_local_url('tag', array('tag' => $canonical));
+    if (common_config('singleuser', 'enabled')) {
+        // regular TagAction isn't set up in 1user mode
+        $url = common_local_url('showstream',
+                                array('nickname' => common_config('singleuser', 'nickname'),
+                                      'tag' => $canonical));
+    } else {
+        $url = common_local_url('tag', array('tag' => $canonical));
+    }
     $xs = new XMLStringer();
     $xs->elementStart('span', 'tag');
     $xs->element('a', array('href' => $url,