summaryrefslogtreecommitdiff
path: root/lib/profileformaction.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-04-08 19:06:55 -0700
committerBrion Vibber <brion@pobox.com>2010-04-08 19:06:55 -0700
commit5dbaaed4e68ecae1c78b9493add89df3557c8e98 (patch)
tree7435597d838585df16a8a11c59622654bb201b46 /lib/profileformaction.php
parent4b2dfabff886c7f2e61eef43c7c9de092661d73a (diff)
Maintain 'page' parameter for block from subscribers list, block & make-admin from group members list.
Refactored some of the returnto handling code. It looks like we have several different ways of handling this in the software, icky! Marked the session-based functions with fixmes (they'll stomp on other forms when multiple tabs/windows are used) and combined some commonish bits of code between ProfileFormAction and the group block & makeadmin actions where they're using hidden form parameters. Extended that to allow passing dynamic parameters (eg 'page') as well as static ones (action, target user/group).
Diffstat (limited to 'lib/profileformaction.php')
-rw-r--r--lib/profileformaction.php25
1 files changed, 1 insertions, 24 deletions
diff --git a/lib/profileformaction.php b/lib/profileformaction.php
index 8a934666e..0ffafe5fb 100644
--- a/lib/profileformaction.php
+++ b/lib/profileformaction.php
@@ -41,7 +41,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* @link http://status.net/
*/
-class ProfileFormAction extends Action
+class ProfileFormAction extends RedirectingAction
{
var $profile = null;
@@ -102,29 +102,6 @@ class ProfileFormAction extends Action
}
/**
- * Return to the calling page based on hidden arguments
- *
- * @return void
- */
-
- function returnToArgs()
- {
- foreach ($this->args as $k => $v) {
- if ($k == 'returnto-action') {
- $action = $v;
- } else if (substr($k, 0, 9) == 'returnto-') {
- $args[substr($k, 9)] = $v;
- }
- }
-
- if ($action) {
- common_redirect(common_local_url($action, $args), 303);
- } else {
- $this->clientError(_("No return-to arguments."));
- }
- }
-
- /**
* handle a POST request
*
* sub-classes should overload this request