summaryrefslogtreecommitdiff
path: root/lib/action.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-16 17:54:34 +0100
committerEvan Prodromou <evan@status.net>2009-11-16 17:54:34 +0100
commit968058c68b0d23e3dccc85301d78dccf8bcc0ba1 (patch)
treea5613ef0fbce478ad101bb4fd75d2725f99b7f72 /lib/action.php
parent84e427c6c147ec69f6d2f32ea64c1508e7c4dded (diff)
getting arguments for return-to processing
Diffstat (limited to 'lib/action.php')
-rw-r--r--lib/action.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/action.php b/lib/action.php
index b5cf3240c..4c1e73564 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -986,6 +986,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;
unset($args['action']);
@@ -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);
}
/**