From 968058c68b0d23e3dccc85301d78dccf8bcc0ba1 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 16 Nov 2009 17:54:34 +0100 Subject: [PATCH] getting arguments for return-to processing --- lib/action.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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); } /** -- 2.39.5