diff options
author | Zach Copley <zach@status.net> | 2010-02-11 13:54:40 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-02-11 13:56:05 -0800 |
commit | c465f675d9dbcf9f808bc31a1d01e753df4ddf58 (patch) | |
tree | cccfd152bf1d52f27cd63d00c0337c1273991a11 /lib/api.php | |
parent | c8d5c8442fe6ce54f7f65d1d0eb4203b06c09583 (diff) |
Make Atom timelines in the API use Atom10feed
Diffstat (limited to 'lib/api.php')
-rw-r--r-- | lib/api.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/api.php b/lib/api.php index fd07bbbbe..8f1fe1ef7 100644 --- a/lib/api.php +++ b/lib/api.php @@ -1321,4 +1321,22 @@ class ApiAction extends Action } } + function getSelfUri($action, $aargs) + { + parse_str($_SERVER['QUERY_STRING'], $params); + $pstring = ''; + if (!empty($params)) { + unset($params['p']); + $pstring = http_build_query($params); + } + + $uri = common_local_url($action, $aargs); + + if (!empty($pstring)) { + $uri .= '?' . $pstring; + } + + return $uri; + } + } |