From 930f82a95170e05ad2d4fc079cc944d29521797d Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 19 Jan 2009 18:21:14 +0000 Subject: Update tag to use new framework Broke up the tag action into two different actions (publictagcloud and tag). Brought it up-to-date with the new framework, but haven't fixed it for phpcs yet. --- lib/publicgroupnav.php | 4 ++-- lib/util.php | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/publicgroupnav.php b/lib/publicgroupnav.php index 97b57ec17..8dd97a3b7 100644 --- a/lib/publicgroupnav.php +++ b/lib/publicgroupnav.php @@ -76,8 +76,8 @@ class PublicGroupNav extends Widget $this->out->menuItem(common_local_url('public'), _('Public'), _('Public timeline'), $action_name == 'public', 'nav_timeline_public'); - $this->out->menuItem(common_local_url('tag'), _('Recent tags'), - _('Recent tags'), $action_name == 'tag', 'nav_recent-tags'); + $this->out->menuItem(common_local_url('publictagcloud'), _('Recent tags'), + _('Recent tags'), $action_name == 'publictagcloud', 'nav_recent-tags'); if (count(common_config('nickname', 'featured')) > 0) { $this->out->menuItem(common_local_url('featured'), _('Featured'), diff --git a/lib/util.php b/lib/util.php index d67c64972..73c4cdcc8 100644 --- a/lib/util.php +++ b/lib/util.php @@ -865,13 +865,11 @@ function common_fancy_url($action, $args=null) case 'avatarbynickname': return common_path($args['nickname'].'/avatar/'.$args['size']); case 'tag': - if (isset($args['tag']) && $args['tag']) { - $path = 'tag/' . $args['tag']; - unset($args['tag']); - } else { - $path = 'tags'; - } + $path = 'tag/' . $args['tag']; + unset($args['tag']); return common_path($path . (($args) ? ('?' . http_build_query($args)) : '')); + case 'publictagcloud': + return common_path('tags'); case 'peopletag': $path = 'peopletag/' . $args['tag']; unset($args['tag']); -- cgit v1.2.3-54-g00ecf