diff options
author | MateBartus <mate.bartus@gmail.com> | 2015-02-24 21:23:58 +0100 |
---|---|---|
committer | MateBartus <mate.bartus@gmail.com> | 2015-02-24 21:23:58 +0100 |
commit | 19fe32d5b2bad52cac9fd86de8f0120405b69119 (patch) | |
tree | 898700d29f729aaa08940098121581a6045ce650 /phpBB/includes/acp | |
parent | b8dfbfe390590c16cc6a9a829ce17d55482ae230 (diff) | |
download | forums-19fe32d5b2bad52cac9fd86de8f0120405b69119.tar forums-19fe32d5b2bad52cac9fd86de8f0120405b69119.tar.gz forums-19fe32d5b2bad52cac9fd86de8f0120405b69119.tar.bz2 forums-19fe32d5b2bad52cac9fd86de8f0120405b69119.tar.xz forums-19fe32d5b2bad52cac9fd86de8f0120405b69119.zip |
[ticket/13636] Deleting inactive user in acp_users gives unexpected link
Change "referer" to "redirect" in variable names and GET params as well.
PHPBB3-13636
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r-- | phpBB/includes/acp/acp_inactive.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_users.php | 17 |
2 files changed, 10 insertions, 9 deletions
diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php index 473ef01b6a..4a70401026 100644 --- a/phpBB/includes/acp/acp_inactive.php +++ b/phpBB/includes/acp/acp_inactive.php @@ -271,7 +271,7 @@ class acp_inactive 'REMINDED_EXPLAIN' => $user->lang('USER_LAST_REMINDED', (int) $row['user_reminded'], $user->format_date($row['user_reminded_time'])), - 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&mode=overview&referer=acp_inactive')), + 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&mode=overview&redirect=acp_inactive')), 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']), 'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']), diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 05852bff6d..26ea1a2c11 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -44,9 +44,10 @@ class acp_users $user_id = request_var('u', 0); $action = request_var('action', ''); - $referer = request_var('referer', ''); - $referer_tag = "referer=$referer"; - $referer_url = append_sid("{$phpbb_admin_path}index.$phpEx", "i=$referer"); + // Get referer to redirect user to the appropriate page after delete action + $redirect = request_var('redirect', ''); + $redirect_tag = "redirect=$redirect"; + $redirect_url = append_sid("{$phpbb_admin_path}index.$phpEx", "i=$redirect"); $submit = (isset($_POST['update']) && !isset($_POST['cancel'])) ? true : false; @@ -150,9 +151,9 @@ class acp_users } $template->assign_vars(array( - 'U_BACK' => ( (empty($referer)) ? $this->u_action : $referer_url ), + 'U_BACK' => ( (empty($redirect)) ? $this->u_action : $redirect_url ), 'U_MODE_SELECT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&u=$user_id"), - 'U_ACTION' => $this->u_action . '&u=' . $user_id . ( (empty($referer)) ? '' : '&' . $referer_tag ), + 'U_ACTION' => $this->u_action . '&u=' . $user_id . ( (empty($redirect)) ? '' : '&' . $redirect_tag ), 'S_FORM_OPTIONS' => $s_form_options, 'MANAGED_USERNAME' => $user_row['username']) ); @@ -226,7 +227,7 @@ class acp_users add_log('admin', 'LOG_USER_DELETED', $user_row['username']); trigger_error($user->lang['USER_DELETED'] . adm_back_link( - (empty($referer)) ? $this->u_action : $referer_url + (empty($redirect)) ? $this->u_action : $redirect_url ) ); } @@ -243,9 +244,9 @@ class acp_users ); // Checks if the redirection page is specified - if (!empty($referer)) + if (!empty($redirect)) { - $delete_confirm_hidden_fields['referer'] = $referer; + $delete_confirm_hidden_fields['redirect'] = $redirect; } confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($delete_confirm_hidden_fields)); |