mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 10:16:36 +02:00
More updates, append sid to admin browsing
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3101 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -164,12 +164,12 @@ function validate_optional_fields(&$icq, &$aim, &$msnm, &$yim, &$website, &$loca
|
||||
// contains at least one dot.
|
||||
if ( $website != "" )
|
||||
{
|
||||
if ( !preg_match('#^http:\/\/#i', $website) )
|
||||
if ( !preg_match('#^http[s]?:\/\/#i', $website) )
|
||||
{
|
||||
$website = 'http://' . $website;
|
||||
}
|
||||
|
||||
if ( !preg_match('#^http\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $website) )
|
||||
if ( !preg_match('#^http[s]?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $website) )
|
||||
{
|
||||
$website = '';
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ if ( !defined('IN_PHPBB') )
|
||||
//
|
||||
// Show the overall footer.
|
||||
//
|
||||
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="' . append_sid("admin/index.$phpEx") . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
|
||||
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
|
||||
|
||||
$template->set_filenames(array(
|
||||
'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
|
||||
|
@@ -84,7 +84,7 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
|
||||
// No match; don't login, set as anonymous user
|
||||
$login = 0;
|
||||
$enable_autologin = 0;
|
||||
$user_id = ANONYMOUS;
|
||||
$user_id = $userdata['user_id'] = ANONYMOUS;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -92,7 +92,7 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
|
||||
// Autologin is not set. Don't login, set as anonymous user
|
||||
$login = 0;
|
||||
$enable_autologin = 0;
|
||||
$user_id = ANONYMOUS;
|
||||
$user_id = $userdata['user_id'] = ANONYMOUS;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -182,7 +182,7 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
|
||||
setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);
|
||||
setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
|
||||
|
||||
$SID = ( $sessionmethod == SESSION_METHOD_GET ) ? 'sid=' . $session_id : '';
|
||||
$SID = ($sessionmethod == SESSION_METHOD_GET || defined('IN_ADMIN')) ? 'sid=' . $session_id : '';
|
||||
|
||||
return $userdata;
|
||||
}
|
||||
@@ -250,9 +250,9 @@ function session_pagestart($user_ip, $thispage_id)
|
||||
$ip_check_s = substr($userdata['session_ip'], 0, 6);
|
||||
$ip_check_u = substr($user_ip, 0, 6);
|
||||
|
||||
if ( $ip_check_s == $ip_check_u )
|
||||
if ($ip_check_s == $ip_check_u)
|
||||
{
|
||||
$SID = ( $sessionmethod == SESSION_METHOD_GET ) ? 'sid=' . $session_id : '';
|
||||
$SID = ($sessionmethod == SESSION_METHOD_GET || defined('IN_ADMIN')) ? 'sid=' . $session_id : '';
|
||||
|
||||
//
|
||||
// Only update session DB a minute or so after last update
|
||||
|
Reference in New Issue
Block a user