]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/api.php
Make Atom timelines in the API use Atom10feed
[quix0rs-gnu-social.git] / lib / api.php
index fd07bbbbe080a6644c9e69dcd7b624d82942db95..8f1fe1ef712c15b9e0c708ab6b84bc9edb778aed 100644 (file)
@@ -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;
+    }
+
 }