From: Brion Vibber Date: Thu, 8 Apr 2010 20:12:14 +0000 (-0700) Subject: In single-user mode, link #hashtags to the user's tagged stream rather than the globa... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=88678eadfa2e93f540195bd934833e58f23639f7;p=quix0rs-gnu-social.git 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. --- diff --git a/lib/util.php b/lib/util.php index f4ee26bbf0..bbc3341769 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,