getting arguments for return-to processing

This commit is contained in:
Evan Prodromou 2009-11-16 17:54:34 +01:00
parent 84e427c6c1
commit 968058c68b

View File

@ -985,6 +985,18 @@ class Action extends HTMLOutputter // lawsuit
*/ */
function selfUrl() 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'); $action = $this->trimmed('action');
$args = $this->args; $args = $this->args;
@ -998,8 +1010,7 @@ class Action extends HTMLOutputter // lawsuit
foreach (array_keys($_COOKIE) as $cookie) { foreach (array_keys($_COOKIE) as $cookie) {
unset($args[$cookie]); unset($args[$cookie]);
} }
return array($action, $args);
return common_local_url($action, $args);
} }
/** /**