From: Evan Prodromou Date: Mon, 16 Nov 2009 16:54:34 +0000 (+0100) Subject: getting arguments for return-to processing X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=968058c68b0d23e3dccc85301d78dccf8bcc0ba1;p=quix0rs-gnu-social.git getting arguments for return-to processing --- diff --git a/lib/action.php b/lib/action.php index b5cf3240c6..4c1e735644 100644 --- a/lib/action.php +++ b/lib/action.php @@ -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); } /**