summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2008-10-23 17:26:59 -0400
committerEvan Prodromou <evan@controlyourself.ca>2008-10-23 17:26:59 -0400
commit18d4226ead47b08af03f5e659822389a3cd6bbc9 (patch)
treeb36923cc004e1047f326454b0e5dff4d9db6a181 /lib
parent894496f0e87fe198a0271cefdea1396c7c9f685d (diff)
add atom and RSS 2.0 link elements to head of profile page
darcs-hash:20081023212659-5ed1f-0efa86cf7fbcc7bae4cb468fc514f33adf15ba0d.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/util.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index 383bbe939..924625e02 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -954,6 +954,23 @@ function common_fancy_url($action, $args=NULL) {
return common_path('message/' . $args['message']);
case 'newmessage':
return common_path('message/new' . (($args) ? ('?' . http_build_query($args)) : ''));
+ case 'api':
+ # XXX: do fancy URLs for all the API methods
+ switch (strtolower($args['apiaction'])) {
+ case 'statuses':
+ switch (strtolower($args['method'])) {
+ case 'user_timeline.rss':
+ return common_path('api/statuses/user_timeline/'.$args['argument'].'.rss');
+ case 'user_timeline.atom':
+ return common_path('api/statuses/user_timeline/'.$args['argument'].'.rss');
+ case 'user_timeline.rss':
+ return common_path('api/statuses/user_timeline/'.$args['argument'].'.rss');
+ case 'user_timeline.atom':
+ return common_path('api/statuses/user_timeline/'.$args['argument'].'.rss');
+ default: return common_simple_url($action, $args);
+ }
+ default: return common_simple_url($action, $args);
+ }
default:
return common_simple_url($action, $args);
}