[Phpbb-php5mod-cvs-checkins] phpbb-php5/admin admin_db_utilities.php,1.2,1.3 index.php,1.2,1.3
Brought to you by:
jelly_doughnut
From: Josh <jel...@us...> - 2005-02-22 01:21:19
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14972/admin Modified Files: admin_db_utilities.php index.php Log Message: Updating to phpBB 2.0.12. Release within 24 hours hopefully :) Index: admin_db_utilities.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/admin_db_utilities.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_db_utilities.php 30 Jul 2004 02:12:37 -0000 1.2 --- admin_db_utilities.php 22 Feb 2005 01:21:01 -0000 1.3 *************** *** 694,698 **** } ! $tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words'); $additional_tables = (isset($_POST['additional_tables'])) ? $_POST['additional_tables'] : ( (isset($_GET['additional_tables'])) ? $_GET['additional_tables'] : "" ); --- 694,698 ---- } ! $tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words', 'confirm'); $additional_tables = (isset($_POST['additional_tables'])) ? $_POST['additional_tables'] : ( (isset($_GET['additional_tables'])) ? $_GET['additional_tables'] : "" ); Index: index.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.php 30 Jul 2004 02:12:37 -0000 1.2 --- index.php 22 Feb 2005 01:21:01 -0000 1.3 *************** *** 561,564 **** --- 561,630 ---- } + // Check for new version + // phpBB-php5 should do something else I guess... + $current_version = explode('.', '2' . $board_config['version']); + $minor_revision = (int) $current_version[2]; + + $errno = 0; + $errstr = $version_info = ''; + + if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr)) + { + @fputs($fsock, "GET /updatecheck/20x.txt HTTP/1.1\r\n"); + @fputs($fsock, "HOST: www.phpbb.com\r\n"); + @fputs($fsock, "Connection: close\r\n\r\n"); + + $get_info = false; + while (!@feof($fsock)) + { + if ($get_info) + { + $version_info .= @fread($fsock, 1024); + } + else + { + if (@fgets($fsock, 1024) == "\r\n") + { + $get_info = true; + } + } + } + @fclose($fsock); + + $version_info = explode("\n", $version_info); + $latest_head_revision = (int) $version_info[0]; + $latest_minor_revision = (int) $version_info[2]; + $latest_version = (int) $version_info[0] . '.' . (int) $version_info[1] . '.' . (int) $version_info[2]; + + if ($latest_head_revision == 2 && $minor_revision == $latest_minor_revision) + { + $version_info = '<p style="color:green">' . $lang['Version_up_to_date'] . '</p>'; + } + else + { + $version_info = '<p style="color:red">' . $lang['Version_not_up_to_date']; + $version_info .= '<br />' . sprintf($lang['Latest_version_info'], $latest_version) . sprintf($lang['Current_version_info'], '2' . $board_config['version']) . '</p>'; + } + } + else + { + if ($errstr) + { + $version_info = '<p style="color:red">' . sprintf($lang['Connect_socket_error'], $errstr) . '</p>'; + } + else + { + $version_info = '<p>' . $lang['Socket_functions_disabled'] . '</p>'; + } + } + + $version_info .= '<p>' . $lang['Mailing_list_subscribe_reminder'] . '</p>'; + + + $template->assign_vars(array( + 'VERSION_INFO' => $version_info, + 'L_VERSION_INFORMATION' => $lang['Version_information']) + ); + $template->pparse("body"); |