diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-11-20 21:57:49 -0500 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-11-20 21:57:49 -0500 |
commit | 75f107823e4227225791e1807a3b7b56092beaa9 (patch) | |
tree | 41dbe8d65fd979bd93c92fd6f80fe4161d38694d /lib | |
parent | ca8f45fc6ea609450de75afc3438d9c43c42a7bb (diff) |
fancier urls for tagged subscriptions/subscribers
darcs-hash:20081121025749-84dde-9fd9a98c23ecabd1c1615dec938edbd4be884aec.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php index ce9e312b6..b8e482eef 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1045,11 +1045,15 @@ function common_fancy_url($action, $args=NULL) { case 'subscribers': $nickname = $args['nickname']; unset($args['nickname']); + if (isset($args['tag'])) { + $tag = $args['tag']; + unset($args['tag']); + } $params = http_build_query($args); if ($params) { - return common_path($nickname.'/'.$action . '?' . $params); + return common_path($nickname.'/'.$action . (($tag) ? '/' . tag : '') . '?' . $params); } else { - return common_path($nickname.'/'.$action); + return common_path($nickname.'/'.$action . (($tag) ? '/' . tag : '')); } case 'allrss': return common_path($args['nickname'].'/all/rss'); |