summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-06-06 16:01:51 -0400
committerEvan Prodromou <evan@prodromou.name>2008-06-06 16:01:51 -0400
commitdaf5b82183216c0d0bffd0268eb55a08dd7f8ac6 (patch)
treed601e1ecea52c4b5e731044331aa83ba5927accc /lib/util.php
parentf6133afb72262ae8e7705c183f52cd0cfdb863f4 (diff)
fancy URLs
darcs-hash:20080606200151-84dde-4ed7ae04c16441a431544c207effcfdea1c72a6c.gz
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index 250857912..f59094c06 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -482,6 +482,47 @@ function common_local_url($action, $args=NULL) {
function common_fancy_url($action, $args=NULL) {
switch (strtolower($action)) {
+ case 'public':
+ return common_path('');
+ case 'publicrss':
+ return common_path('rss');
+ case 'doc':
+ return common_path('doc/'.$args['title']);
+ case 'login':
+ case 'logout':
+ case 'register':
+ case 'subscribe':
+ case 'unsubscribe':
+ return common_path('main/'.$action);
+ case 'accesstoken':
+ case 'requesttoken':
+ case 'postnotice':
+ case 'userauthorization':
+ return common_path('omb/'.$action);
+ case 'remotesubscribe':
+ return common_path('omb/subscribe');
+ case 'finishremotesubscribe':
+ return common_path('omb/finish');
+ case 'avatar':
+ case 'password':
+ return common_path('settings/'.$action);
+ case 'profilesettings':
+ return common_path('settings/profile');
+ case 'newnotice':
+ return common_path('notice/new');
+ case 'shownotice':
+ return common_path('notice/'.$args['notice']);
+ case 'subscriptions':
+ case 'subscribed':
+ case 'xrds':
+ case 'all':
+ return common_path($args['nickname'].'/'.$action);
+ case 'allrss':
+ return common_path($args['nickname'].'/all/rss');
+ case 'userrss':
+ return common_path($args['nickname'].'/rss');
+ case 'showstream':
+ return common_path($args['nickname']);
default:
return common_simple_url($action, $args);
}