summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--htaccess.sample3
-rw-r--r--lib/util.php8
2 files changed, 9 insertions, 2 deletions
diff --git a/htaccess.sample b/htaccess.sample
index 28da7b66f..4779f18b1 100644
--- a/htaccess.sample
+++ b/htaccess.sample
@@ -76,6 +76,9 @@ RewriteRule ^featured/?$ index.php?action=featured [L,QSA]
RewriteRule ^favorited/?$ index.php?action=favorited [L,QSA]
RewriteRule ^(\w+)/subscriptions$ index.php?action=subscriptions&nickname=$1 [L,QSA]
+RewriteRule ^(\w+)/subscriptions/([a-zA-Z0-9]+)$ index.php?action=subscriptions&nickname=$1&tag=$2 [L,QSA]
+RewriteRule ^(\w+)/subscribers$ index.php?action=subscribers&nickname=$1 [L,QSA]
+RewriteRule ^(\w+)/subscribers/([a-zA-Z0-9]+)$ index.php?action=subscribers&nickname=$1&tag=$2 [L,QSA]
RewriteRule ^(\w+)/subscribers$ index.php?action=subscribers&nickname=$1 [L,QSA]
RewriteRule ^(\w+)/xrds$ index.php?action=xrds&nickname=$1 [L,QSA]
RewriteRule ^(\w+)/rss$ index.php?action=userrss&nickname=$1 [L,QSA]
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');