From: Evan Prodromou Date: Sun, 19 Dec 2010 15:15:56 +0000 (-0500) Subject: Notice_tag::url() gets the URL for a tag string X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9480bf1d10d84dc68951df19d35f2b865892452e;p=quix0rs-gnu-social.git Notice_tag::url() gets the URL for a tag string --- diff --git a/classes/Notice_tag.php b/classes/Notice_tag.php index bb67c8f819..f795bfc601 100644 --- a/classes/Notice_tag.php +++ b/classes/Notice_tag.php @@ -87,4 +87,19 @@ class Notice_tag extends Memcached_DataObject { return Memcached_DataObject::pkeyGet('Notice_tag', $kv); } + + static function url($tag) + { + if (common_config('singleuser', 'enabled')) { + // regular TagAction isn't set up in 1user mode + $nickname = User::singleUserNickname(); + $url = common_local_url('showstream', + array('nickname' => $nickname, + 'tag' => $tag)); + } else { + $url = common_local_url('tag', array('tag' => $tag)); + } + + return $url; + } }