]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
getting arguments for return-to processing
authorEvan Prodromou <evan@status.net>
Mon, 16 Nov 2009 16:54:34 +0000 (17:54 +0100)
committerEvan Prodromou <evan@status.net>
Mon, 16 Nov 2009 16:54:34 +0000 (17:54 +0100)
lib/action.php

index b5cf3240c69a39efe131f27dfdad5e4fb6f1606e..4c1e7356447232f21da77d4d6207e8762c307ff6 100644 (file)
@@ -985,6 +985,18 @@ class Action extends HTMLOutputter // lawsuit
      */
 
     function selfUrl()
+    {
+        list($action, $args) = $this->returnToArgs();
+        return common_local_url($action, $args);
+    }
+
+    /**
+     * Returns arguments sufficient for re-constructing URL
+     *
+     * @return array two elements: action, other args
+     */
+
+    function returnToArgs()
     {
         $action = $this->trimmed('action');
         $args   = $this->args;
@@ -998,8 +1010,7 @@ class Action extends HTMLOutputter // lawsuit
         foreach (array_keys($_COOKIE) as $cookie) {
             unset($args[$cookie]);
         }
-
-        return common_local_url($action, $args);
+        return array($action, $args);
     }
 
     /**