|
From: FlorinCB <ory...@us...> - 2008-09-17 00:56:49
|
Update of /cvsroot/mxbb/core/install In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5088 Modified Files: mx_install.php Log Message: Tjis fix will allow installing with php6 and mysql 5.51 if right schema is used Index: mx_install.php =================================================================== RCS file: /cvsroot/mxbb/core/install/mx_install.php,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -d -r1.109 -r1.110 *** mx_install.php 16 Sep 2008 02:31:00 -0000 1.109 --- mx_install.php 17 Sep 2008 07:56:45 -0000 1.110 *************** *** 40,44 **** // This is shown in the top right corner of the installation panels. // ! define('INSTALLER_VERSION', '3.0.3'); define('INSTALLER_NAME', 'MX-Publisher-IWizard'); --- 40,44 ---- // This is shown in the top right corner of the installation panels. // ! define('INSTALLER_VERSION', '3.0.4'); define('INSTALLER_NAME', 'MX-Publisher-IWizard'); *************** *** 67,70 **** --- 67,71 ---- $mx_root_path = '../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); + $tplEx = 'tpl'; // // FYI: *************** *** 152,157 **** unset($input); } // If we are on PHP >= 6.0.0 we do not need some code ! if (phpversion() >= '6.0.0-dev') { /** --- 153,160 ---- unset($input); } + + // If we are on PHP >= 6.0.0 we do not need some code ! if (version_compare(phpversion(), "5.9.9", ">=")) { /** *************** *** 247,314 **** // trying to break out of a SQL statement. // ! if( !get_magic_quotes_gpc() ) { ! if( is_array($_GET) ) { ! while( list($k, $v) = each($_GET) ) { ! if( is_array($_GET[$k]) ) { ! while( list($k2, $v2) = each($_GET[$k]) ) { ! $_GET[$k][$k2] = addslashes($v2); } - @reset($_GET[$k]); - } - else - { - $_GET[$k] = addslashes($v); } } - @reset($_GET); - } ! if( is_array($_POST) ) ! { ! while( list($k, $v) = each($_POST) ) { ! if( is_array($_POST[$k]) ) { ! while( list($k2, $v2) = each($_POST[$k]) ) { ! $_POST[$k][$k2] = addslashes($v2); } - @reset($_POST[$k]); - } - else - { - $_POST[$k] = addslashes($v); } } - @reset($_POST); - } ! if( is_array($HTTP_COOKIE_VARS) ) ! { ! while( list($k, $v) = each($HTTP_COOKIE_VARS) ) { ! if( is_array($HTTP_COOKIE_VARS[$k]) ) { ! while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) ) { ! $HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2); } - @reset($HTTP_COOKIE_VARS[$k]); - } - else - { - $HTTP_COOKIE_VARS[$k] = addslashes($v); } } - @reset($HTTP_COOKIE_VARS); } } - // // End Of Global Vars Initialization --- 250,319 ---- // trying to break out of a SQL statement. // ! if (version_compare(phpversion(), "5.9.9", "<=")) { ! if( !get_magic_quotes_gpc() ) { ! if( is_array($_GET) ) { ! while( list($k, $v) = each($_GET) ) { ! if( is_array($_GET[$k]) ) { ! while( list($k2, $v2) = each($_GET[$k]) ) ! { ! $_GET[$k][$k2] = addslashes($v2); ! } ! @reset($_GET[$k]); ! } ! else ! { ! $_GET[$k] = addslashes($v); } } + @reset($_GET); } ! if( is_array($_POST) ) { ! while( list($k, $v) = each($_POST) ) { ! if( is_array($_POST[$k]) ) { ! while( list($k2, $v2) = each($_POST[$k]) ) ! { ! $_POST[$k][$k2] = addslashes($v2); ! } ! @reset($_POST[$k]); ! } ! else ! { ! $_POST[$k] = addslashes($v); } } + @reset($_POST); } ! if( is_array($HTTP_COOKIE_VARS) ) { ! while( list($k, $v) = each($HTTP_COOKIE_VARS) ) { ! if( is_array($HTTP_COOKIE_VARS[$k]) ) { ! while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) ) ! { ! $HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2); ! } ! @reset($HTTP_COOKIE_VARS[$k]); ! } ! else ! { ! $HTTP_COOKIE_VARS[$k] = addslashes($v); } } + @reset($HTTP_COOKIE_VARS); } } } // // End Of Global Vars Initialization *************** *** 456,460 **** $template = new Template($mx_root_path . 'install/templates'); page_header_install($lang['Welcome_install'], $lang['Choose_lang_explain']); ! $template->set_filenames(array('language' => 'mx_install_language.tpl')); $template->assign_vars(array( 'L_INITIAL_CONFIGURATION' => $lang['Install_settings'], --- 461,465 ---- $template = new Template($mx_root_path . 'install/templates'); page_header_install($lang['Welcome_install'], $lang['Choose_lang_explain']); ! $template->set_filenames(array('language' => 'mx_install_language.'.$tplEx)); $template->assign_vars(array( 'L_INITIAL_CONFIGURATION' => $lang['Install_settings'], *************** *** 589,598 **** case 'phpbb2': ! $tplEx = 'tpl'; break; case 'phpbb3': ! $tplEx = 'html'; break; } --- 594,603 ---- case 'phpbb2': ! //$tplEx = 'tpl'; break; case 'phpbb3': ! //$tplEx = 'html'; break; } *************** *** 675,679 **** $template = new Template($mx_root_path . 'install/templates'); page_header_install($lang['Welcome_install'], $instruction_text); ! $template->set_filenames(array('button' => 'mx_install_button.tpl')); $template->assign_vars(array( 'S_FORM_ACTION' => "mx_install.$phpEx", --- 680,684 ---- $template = new Template($mx_root_path . 'install/templates'); page_header_install($lang['Welcome_install'], $instruction_text); ! $template->set_filenames(array('button' => 'mx_install_button.'.$tplEx)); $template->assign_vars(array( 'S_FORM_ACTION' => "mx_install.$phpEx", *************** *** 737,741 **** $template = new Template($mx_root_path . 'install/templates'); page_header_install($lang['Welcome_install'], $instruction_text); ! $template->set_filenames(array('button' => 'mx_install_button.tpl')); $template->assign_vars(array( 'S_FORM_ACTION' => "mx_install.$phpEx", --- 742,746 ---- $template = new Template($mx_root_path . 'install/templates'); page_header_install($lang['Welcome_install'], $instruction_text); ! $template->set_filenames(array('button' => 'mx_install_button.'.$tplEx)); $template->assign_vars(array( 'S_FORM_ACTION' => "mx_install.$phpEx", *************** *** 988,992 **** $template = new Template($mx_root_path . 'install/templates'); page_header_install($install_title, $message); ! $template->set_filenames(array('button' => 'mx_install_button.tpl')); $action_label = $install_mode == 'upgrade' ? $lang['Go_to_admincp'] : $mx_portal_name; --- 993,997 ---- $template = new Template($mx_root_path . 'install/templates'); page_header_install($install_title, $message); ! $template->set_filenames(array('button' => 'mx_install_button.'.$tplEx)); $action_label = $install_mode == 'upgrade' ? $lang['Go_to_admincp'] : $mx_portal_name; *************** *** 1030,1034 **** $upgrade_mode = defined('PHPBB_INSTALLED') ? 'from28x' : ''; page_header_install($lang['Welcome_install'], $lang['Upgrade_Instruction']); ! $template->set_filenames(array('button' => 'mx_install_button.tpl')); $s_hidden_fields = '<input type="hidden" name="install_mode" value="' . $install_mode . '" />'. --- 1035,1039 ---- $upgrade_mode = defined('PHPBB_INSTALLED') ? 'from28x' : ''; page_header_install($lang['Welcome_install'], $lang['Upgrade_Instruction']); ! $template->set_filenames(array('button' => 'mx_install_button.'.$tplEx)); $s_hidden_fields = '<input type="hidden" name="install_mode" value="' . $install_mode . '" />'. *************** *** 1054,1058 **** $install_mode = 'install'; page_header_install($lang['Welcome_install'], $lang['Install_Instruction']); ! $template->set_filenames(array('body' => 'mx_install_body.tpl')); // --- 1059,1063 ---- $install_mode = 'install'; page_header_install($lang['Welcome_install'], $lang['Install_Instruction']); ! $template->set_filenames(array('body' => 'mx_install_body.'.$tplEx)); // |