|
From: FlorinCB <ory...@us...> - 2008-09-17 00:56:49
|
Update of /cvsroot/mxbb/core/install/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5088/includes Modified Files: functions_install.php Log Message: Tjis fix will allow installing with php6 and mysql 5.51 if right schema is used Index: functions_install.php =================================================================== RCS file: /cvsroot/mxbb/core/install/includes/functions_install.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** functions_install.php 12 Sep 2008 06:27:34 -0000 1.17 --- functions_install.php 17 Sep 2008 07:56:44 -0000 1.18 *************** *** 17,23 **** function page_header_install($title, $instruction_text = '') { ! global $template, $lang, $mx_root_path, $mx_portal_name, $mx_portal_version; ! $template->set_filenames(array('header' => 'mx_install_header.tpl')); $template->assign_vars(array( 'L_PORTAL_NAME' => $mx_portal_name, --- 17,23 ---- function page_header_install($title, $instruction_text = '') { ! global $template, $lang, $mx_root_path, $mx_portal_name, $mx_portal_version, $tplEx; ! $template->set_filenames(array('header' => 'mx_install_header.'.$tplEx)); $template->assign_vars(array( 'L_PORTAL_NAME' => $mx_portal_name, *************** *** 32,36 **** function page_footer_install($show_phpinfo = true) { ! global $db, $template, $lang; $install_moreinfo = sprintf($lang['Install_moreinfo'], --- 32,36 ---- function page_footer_install($show_phpinfo = true) { ! global $db, $template, $lang, $tplEx; $install_moreinfo = sprintf($lang['Install_moreinfo'], *************** *** 42,46 **** ); ! $template->set_filenames(array('footer' => 'mx_install_footer.tpl')); $template->assign_vars(array( 'L_INSTALLER_NAME' => INSTALLER_NAME, --- 42,46 ---- ); ! $template->set_filenames(array('footer' => 'mx_install_footer.'.$tplEx)); $template->assign_vars(array( 'L_INSTALLER_NAME' => INSTALLER_NAME, *************** *** 927,943 **** $dbms = $phpbb_info['dbms']; ! ! require_once($mx_root_path . 'includes/db/' . $dbms . '.' . $phpEx); // Load dbal and initiate class ! ! if(!$db->db_connect_id) { // Connect to DB @define('SQL_LAYER', $dbms); ! $sql_db = 'dbal_' . $dbms; $db = new $sql_db(); if(!$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, false)) { ! print_r("Could not connect to all databases"); } } --- 927,957 ---- $dbms = $phpbb_info['dbms']; ! ! // If we are on PHP < 5.0.0 we need to force include or we get a blank page ! if (phpversion() < '5.0.0-dev') ! { ! print("This version of php is not supported, returned: " . phpversion() . '<br />Please upgrade at least to 5.1.2.'); ! require_once($mx_root_path . 'includes/db/' . $dbms . '.' . $phpEx); // Load dbal and initiate class ! } ! else ! { ! require_once($mx_root_path . 'includes/db/' . $dbms . '.' . $phpEx); // Load dbal and initiate class ! } if(!$db->db_connect_id) { // Connect to DB @define('SQL_LAYER', $dbms); ! $sql_db = 'dbal_' . $dbms; ! $db = new $sql_db(); + + if(!is_object($db)) + { + print("Could not load class " . $db . '<br />'); + } + if(!$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, false)) { ! print("Could not connect to all databases"); } } *************** *** 977,981 **** function show_phpinfo() { ! global $template, $mx_root_path, $phpEx; // --- 991,995 ---- function show_phpinfo() { ! global $template, $mx_root_path, $phpEx, $tplEx; // *************** *** 1020,1024 **** $template = new Template($mx_root_path . 'install/templates'); page_header_install('phpInfo()'); ! $template->set_filenames(array('phpinfo' => 'mx_install_phpinfo.tpl')); $template->assign_vars(array('PHPINFO' => $body_part)); $template->pparse('phpinfo'); --- 1034,1038 ---- $template = new Template($mx_root_path . 'install/templates'); page_header_install('phpInfo()'); ! $template->set_filenames(array('phpinfo' => 'mx_install_phpinfo.'.$tplEx)); $template->assign_vars(array('PHPINFO' => $body_part)); $template->pparse('phpinfo'); |