|
From: Florin C B. <ory...@us...> - 2013-06-17 04:21:53
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3 In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14794 Modified Files: core.php session.php Log Message: Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/core.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** core.php 26 Apr 2013 14:14:18 -0000 1.23 --- core.php 17 Jun 2013 04:21:50 -0000 1.24 *************** *** 1104,1108 **** if ($guest) { ! $sql = "SELECT u.*, s.* FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s WHERE u.user_id = " . ANONYMOUS . " --- 1104,1108 ---- if ($guest) { ! $sql = "SELECT u.*, s.*, s.session_page AS user_session_page FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s WHERE u.user_id = " . ANONYMOUS . " *************** *** 1113,1117 **** else { ! $sql = "SELECT u.*, s.*, s.session_time AS user_session_time FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s WHERE u.user_id <> " . ANONYMOUS . " --- 1113,1117 ---- else { ! $sql = "SELECT u.*, s.*, s.session_time AS user_session_time, s.session_page AS user_session_page FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s WHERE u.user_id <> " . ANONYMOUS . " *************** *** 1303,1307 **** { global $db, $template, $board_config, $portal_config, $phpbb_root_path, $mx_root_path, $lang, $theme, $mx_user, $userdata; ! $template->assign_block_vars("forum_stats", array()); // --- 1303,1307 ---- { global $db, $template, $board_config, $portal_config, $phpbb_root_path, $mx_root_path, $lang, $theme, $mx_user, $userdata; ! $template->assign_block_vars("forum_stats", array()); // *************** *** 1388,1391 **** --- 1388,1392 ---- if( preg_match("/^(3\.23|4\.|5\.)/", $version) ) { + static $dbname, $dbsize; $db_name = ( preg_match("/^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)|(5\.)/", $version) ) ? "`$dbname`" : $dbname; *************** *** 1481,1505 **** * @return unknown */ ! function phpbb_version_check() { ! global $board_config, $lang; ! ! $current_phpbb_version = explode('.', '' . $board_config['version']); ! $minor_phpbb_revision = (int) $current_phpbb_version[3]; ! $errno = 0; $errstr = $phpbb_version_info = ''; if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr, 10)) { ! $phpbb_version_info = mx_get_remote_file('www.phpbb.com', '/updatecheck', ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno); ! if ($info === false) { ! trigger_error($errstr, E_USER_WARNING); } ! $phpbb_version_info = explode("\n", $phpbb_version_info); ! $announcement_url = trim($info[1]); //$update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update'); $latest_phpbb_head_revision = trim($phpbb_version_info[0]); --- 1482,1520 ---- * @return unknown */ ! function phpbb_version_check($force_update = false, $warn_fail = false, $ttl = 86400) { ! global $mx_cache, $board_config, $lang, $phpbb_version_info; ! $errno = 0; $errstr = $phpbb_version_info = ''; + $phpbb_version_info = $mx_cache->get('versioncheck'); if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr, 10)) { ! //$phpbb_version_info = mx_get_remote_file('www.phpbb.com', '/updatecheck', ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno); ! if ($phpbb_version_info === false || $force_update) { ! $errstr = ''; ! $errno = 0; ! ! $phpbb_version_info = mx_get_remote_file('version.phpbb.com', '/phpbb', ! ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno); ! } ! ! if (empty($phpbb_version_info)) ! { ! $mx_cache->destroy('versioncheck'); ! if ($warn_fail) ! { ! trigger_error($errstr, E_USER_WARNING); ! } ! return false; } ! $mx_cache->put('versioncheck', $phpbb_version_info, $ttl); ! $phpbb_version_info = explode("\n", $phpbb_version_info); ! //$latest_phpbb_version_info = phpbb_version_compare(trim($phpbb_version_info[0]), $board_config['version'], '<='); ! //$latest_version = trim($phpbb_version_info[0]); //$update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update'); $latest_phpbb_head_revision = trim($phpbb_version_info[0]); *************** *** 1507,1510 **** --- 1522,1528 ---- $latest_phpbb_version = trim($phpbb_version_info[0]) . '.' . trim($phpbb_version_info[1]) . '.' . trim($phpbb_version_info[2]); + $current_phpbb_version = explode(".", $board_config['version']); + $minor_phpbb_revision = (int) $current_phpbb_version[3]; + if ($latest_phpbb_head_revision == 3 && $minor_phpbb_revision == $latest_phpbb_minor_revision) { Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/session.php,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** session.php 17 Jun 2013 02:51:56 -0000 1.53 --- session.php 17 Jun 2013 04:21:50 -0000 1.54 *************** *** 96,102 **** $this->session_begin(); - // // Redefine some MXP stylish userdata - // $this->data['session_logged_in'] = $this->data['user_id'] != ANONYMOUS ? 1 : 0; --- 96,100 ---- *************** *** 120,123 **** --- 118,122 ---- $this->data['session_id'] = $this->session_id; + $this->data['user_session_page'] = $this->data['session_page']; } |