mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/13636] Deleting inactive user in acp_users gives unexpected link
Success message did not provide the expected "previous page" link (acp_inactive was expected, but the link took users to acp_users) if the acp_users module was accessed by navigating from the inactive user list to acp_users and then deleting inactive user. PHPBB3-13636
This commit is contained in:
parent
56cbff720d
commit
b8dfbfe390
2 changed files with 21 additions and 6 deletions
|
@ -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')),
|
||||
'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' => 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']),
|
||||
|
||||
|
|
|
@ -44,6 +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");
|
||||
|
||||
$submit = (isset($_POST['update']) && !isset($_POST['cancel'])) ? true : false;
|
||||
|
||||
$form_name = 'acp_users';
|
||||
|
@ -146,9 +150,9 @@ class acp_users
|
|||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_BACK' => $this->u_action,
|
||||
'U_BACK' => ( (empty($referer)) ? $this->u_action : $referer_url ),
|
||||
'U_MODE_SELECT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&u=$user_id"),
|
||||
'U_ACTION' => $this->u_action . '&u=' . $user_id,
|
||||
'U_ACTION' => $this->u_action . '&u=' . $user_id . ( (empty($referer)) ? '' : '&' . $referer_tag ),
|
||||
'S_FORM_OPTIONS' => $s_form_options,
|
||||
'MANAGED_USERNAME' => $user_row['username'])
|
||||
);
|
||||
|
@ -221,19 +225,30 @@ class acp_users
|
|||
user_delete($delete_type, $user_id, $user_row['username']);
|
||||
|
||||
add_log('admin', 'LOG_USER_DELETED', $user_row['username']);
|
||||
trigger_error($user->lang['USER_DELETED'] . adm_back_link($this->u_action));
|
||||
trigger_error($user->lang['USER_DELETED'] . adm_back_link(
|
||||
(empty($referer)) ? $this->u_action : $referer_url
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
|
||||
$delete_confirm_hidden_fields = array(
|
||||
'u' => $user_id,
|
||||
'i' => $id,
|
||||
'mode' => $mode,
|
||||
'action' => $action,
|
||||
'update' => true,
|
||||
'delete' => 1,
|
||||
'delete_type' => $delete_type))
|
||||
'delete_type' => $delete_type
|
||||
);
|
||||
|
||||
// Checks if the redirection page is specified
|
||||
if (!empty($referer))
|
||||
{
|
||||
$delete_confirm_hidden_fields['referer'] = $referer;
|
||||
}
|
||||
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($delete_confirm_hidden_fields));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue