summaryrefslogtreecommitdiff
path: root/lib/api.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-12 11:18:35 -0800
committerBrion Vibber <brion@pobox.com>2010-02-12 11:18:35 -0800
commit122c8677b7004bae4cfe7e2bd49fc1bc3187c72c (patch)
tree552bf77b587fbb674329a95745067f358c0a25d3 /lib/api.php
parent3c79448cd817d01b4421262fefc29eb558cede20 (diff)
parentfd3c9334bfcfe627446feb86ac3054b24ed05449 (diff)
Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib/api.php')
-rw-r--r--lib/api.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/api.php b/lib/api.php
index b987badc0..5758cc874 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -1322,4 +1322,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;
+ }
+
}