mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
- cur_page no longer in use
- fix confirm box (since it used cur_page) :) git-svn-id: file:///svn/phpbb/trunk@4996 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
6fe3f0e7d4
commit
2ac2d296e0
2 changed files with 10 additions and 7 deletions
|
@ -1038,7 +1038,8 @@ function meta_refresh($time, $url)
|
||||||
// Build Confirm box
|
// Build Confirm box
|
||||||
function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.html')
|
function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.html')
|
||||||
{
|
{
|
||||||
global $user, $template, $_POST, $SID, $db;
|
global $user, $template, $db;
|
||||||
|
global $SID, $phpEx;
|
||||||
|
|
||||||
if (isset($_POST['cancel']))
|
if (isset($_POST['cancel']))
|
||||||
{
|
{
|
||||||
|
@ -1087,17 +1088,20 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
|
||||||
// If activation key already exist, we better do not re-use the key (something very strange is going on...)
|
// If activation key already exist, we better do not re-use the key (something very strange is going on...)
|
||||||
if (request_var('confirm_key', ''))
|
if (request_var('confirm_key', ''))
|
||||||
{
|
{
|
||||||
// $user->cur_page = preg_replace('#^(.*?)[&|\?]act_key=[A-Z0-9]{10}(.*?)#', '\1\2', str_replace('&', '&', $user->cur_page));
|
// This should not occur, therefore we cancel the operation to safe the user
|
||||||
// Need to adjust...
|
return false;
|
||||||
trigger_error('Hacking attempt');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// re-add $SID
|
||||||
|
$u_action = (strpos($user->page, ".{$phpEx}?") !== false) ? str_replace(".{$phpEx}?", ".$phpEx$SID&", $user->page) . '&' : $user->page . '?';
|
||||||
|
$u_action .= 'confirm_key=' . $confirm_key;
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'MESSAGE_TITLE' => $user->lang[$title],
|
'MESSAGE_TITLE' => $user->lang[$title],
|
||||||
'MESSAGE_TEXT' => $user->lang[$title . '_CONFIRM'],
|
'MESSAGE_TEXT' => $user->lang[$title . '_CONFIRM'],
|
||||||
|
|
||||||
'YES_VALUE' => $user->lang['YES'],
|
'YES_VALUE' => $user->lang['YES'],
|
||||||
'S_CONFIRM_ACTION' => $user->cur_page . ((strpos($user->cur_page, '?') !== false) ? '&' : '?') . 'confirm_key=' . $confirm_key,
|
'S_CONFIRM_ACTION' => $u_action,
|
||||||
'S_HIDDEN_FIELDS' => $hidden . $s_hidden_fields)
|
'S_HIDDEN_FIELDS' => $hidden . $s_hidden_fields)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ class session
|
||||||
var $browser = '';
|
var $browser = '';
|
||||||
var $ip = '';
|
var $ip = '';
|
||||||
var $page = '';
|
var $page = '';
|
||||||
var $cur_page = '';
|
|
||||||
var $current_page_filename = '';
|
var $current_page_filename = '';
|
||||||
var $load;
|
var $load;
|
||||||
|
|
||||||
|
@ -782,7 +781,7 @@ class user extends session
|
||||||
return $imgs[$img . $suffix];
|
return $imgs[$img . $suffix];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start code for checking/setting option bit field for user table (if we go that way)
|
// Start code for checking/setting option bit field for user table
|
||||||
function optionget($key, $data = false)
|
function optionget($key, $data = false)
|
||||||
{
|
{
|
||||||
if (!isset($this->keyvalues[$key]))
|
if (!isset($this->keyvalues[$key]))
|
||||||
|
|
Loading…
Add table
Reference in a new issue