diff options
author | Brion Vibber <brion@pobox.com> | 2010-04-08 13:12:14 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-04-08 17:06:25 -0700 |
commit | 6274c3977d25a1ca9313cc851230b9b520bd4197 (patch) | |
tree | e7b68519640c3c8ea4d403e545e58daeafb42500 /lib | |
parent | ecd31384ed9560aac350085733af4039cf344c8a (diff) |
In single-user mode, link #hashtags to the user's tagged stream rather than the global tag action, which isn't registered.
Previously they would end up pointing to the home URL.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php index 795997868..e37df6348 100644 --- a/lib/util.php +++ b/lib/util.php @@ -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, |