diff options
author | Evan Prodromou <evan@status.net> | 2010-04-30 15:00:55 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-04-30 15:00:55 -0400 |
commit | 3f2c805652cd641f82af41cd5f92cb54d0457a59 (patch) | |
tree | ead13aee17392f4fa9f03ba61ab30ba3b247ee2e /actions/makeadmin.php | |
parent | 50bfa218141a30c5041957aae60b9be78fe74950 (diff) | |
parent | ecfe6b89443227854c057bb45b107368b860ad02 (diff) |
Merge branch 'master' of gitorious.org:statusnet/mainline
Diffstat (limited to 'actions/makeadmin.php')
-rw-r--r-- | actions/makeadmin.php | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/actions/makeadmin.php b/actions/makeadmin.php index f19348648..9ccb44230 100644 --- a/actions/makeadmin.php +++ b/actions/makeadmin.php @@ -41,7 +41,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @link http://status.net/ */ -class MakeadminAction extends Action +class MakeadminAction extends RedirectingAction { var $profile = null; var $group = null; @@ -148,20 +148,19 @@ class MakeadminAction extends Action $this->group->getBestName()); } - foreach ($this->args as $k => $v) { - if ($k == 'returnto-action') { - $action = $v; - } else if (substr($k, 0, 9) == 'returnto-') { - $args[substr($k, 9)] = $v; - } - } + $this->returnToArgs(); + } - if ($action) { - common_redirect(common_local_url($action, $args), 303); - } else { - common_redirect(common_local_url('groupmembers', - array('nickname' => $this->group->nickname)), - 303); - } + /** + * If we reached this form without returnto arguments, default to + * the top of the group's member list. + * + * @return string URL + */ + function defaultReturnTo() + { + return common_local_url('groupmembers', + array('nickname' => $this->group->nickname)); } + } |