|
From: Meik S. <acy...@us...> - 2005-08-18 21:33:25
|
Update of /cvsroot/phpbb/phpBB2/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30513/includes Modified Files: session.php Log Message: - fix some tiny glitches Index: session.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/session.php,v retrieving revision 1.156 retrieving revision 1.157 diff -C2 -r1.156 -r1.157 *** session.php 28 Jul 2005 11:50:27 -0000 1.156 --- session.php 18 Aug 2005 12:58:23 -0000 1.157 *************** *** 44,49 **** $this->browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : ''; ! $this->page = (!empty($_SERVER['REQUEST_URI'])) ? preg_replace('#' . preg_quote($config['script_path'], '#') . '/?([a-z]+?\.' . $phpEx . '\?)sid=[a-z0-9]*(.*?)$#i', '\1\2', $_SERVER['REQUEST_URI']) . ((isset($_POST['f'])) ? 'f=' . intval($_POST['f']) : '') : ''; ! $this->cookie_data = array(); if (isset($_COOKIE[$config['cookie_name'] . '_sid']) || isset($_COOKIE[$config['cookie_name'] . '_u'])) --- 44,49 ---- $this->browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : ''; ! $this->page = (!empty($_SERVER['REQUEST_URI'])) ? preg_replace('#/?' . preg_quote($config['script_path'], '#') . '/?([a-z]+?\.' . $phpEx . '\?)sid=[a-z0-9]*(.*?)$#i', '\1\2', $_SERVER['REQUEST_URI']) . ((isset($_POST['f'])) ? 'f=' . intval($_POST['f']) : '') : ''; ! $this->cookie_data = array(); if (isset($_COOKIE[$config['cookie_name'] . '_sid']) || isset($_COOKIE[$config['cookie_name'] . '_u'])) *************** *** 83,87 **** // Is session_id is set or session_id is set and matches the url param if required ! if (!empty($this->session_id) && (!defined('NEED_SID') || (isset($_GET['sid']) && $this->session_id == $_GET['sid']))) { $sql = 'SELECT u.*, s.* --- 83,87 ---- // Is session_id is set or session_id is set and matches the url param if required ! if (!empty($this->session_id) && (!defined('NEED_SID') || (isset($_GET['sid']) && $this->session_id === $_GET['sid']))) { $sql = 'SELECT u.*, s.* *************** *** 196,200 **** // If we're presented with an autologin key we'll join against it. // Else if we've been passed a user_id we'll grab data based on that ! if ($this->cookie_data['k'] && $this->cookie_data['u']) { $sql = 'SELECT u.* --- 196,200 ---- // If we're presented with an autologin key we'll join against it. // Else if we've been passed a user_id we'll grab data based on that ! if (isset($this->cookie_data['k']) && $this->cookie_data['k'] && $this->cookie_data['u']) { $sql = 'SELECT u.* *************** *** 268,272 **** $db->sql_freeresult($result); ! $this->data['session_last_visit'] = ($this->data['session_time']) ? $this->data['session_time'] : (($this->data['user_lastvisit']) ? $this->data['user_lastvisit'] : time()); } else --- 268,272 ---- $db->sql_freeresult($result); ! $this->data['session_last_visit'] = (isset($this->data['session_time']) && $this->data['session_time']) ? $this->data['session_time'] : (($this->data['user_lastvisit']) ? $this->data['user_lastvisit'] : time()); } else *************** *** 302,307 **** 'session_page' => (string) $this->page, 'session_ip' => (string) $this->ip, ! 'session_admin' => ($set_admin) ? 1 : 0, ! 'session_viewonline' => ($viewonline) ? 1 : 0, ); --- 302,307 ---- 'session_page' => (string) $this->page, 'session_ip' => (string) $this->ip, ! 'session_admin' => ($set_admin) ? 1 : 0, ! 'session_viewonline' => ($viewonline) ? 1 : 0, ); *************** *** 313,317 **** { // Limit new sessions in 1 minute period (if required) ! if (!$this->data['session_time'] && $config['active_sessions']) { $sql = 'SELECT COUNT(*) AS sessions --- 313,317 ---- { // Limit new sessions in 1 minute period (if required) ! if ((!isset($this->data['session_time']) || !$this->data['session_time']) && $config['active_sessions']) { $sql = 'SELECT COUNT(*) AS sessions *************** *** 767,771 **** { case 'mssql': ! case 'mssql-odbc': $sql = 'SELECT s.style_id, t.*, c.*, i.* FROM ' . STYLES_TABLE . ' s, ' . STYLES_TPL_TABLE . ' t, ' . STYLES_CSS_TABLE . ' c, ' . STYLES_IMAGE_TABLE . " i --- 767,771 ---- { case 'mssql': ! case 'mssql_odbc': $sql = 'SELECT s.style_id, t.*, c.*, i.* FROM ' . STYLES_TABLE . ' s, ' . STYLES_TPL_TABLE . ' t, ' . STYLES_CSS_TABLE . ' c, ' . STYLES_IMAGE_TABLE . " i |