// Exit installation here because the .htaccess file has the some errors break; } // Update the progress bar status update_install_progress_bar(); // Try to obtain some serious time to do some serious processing (5 minutes) // NOte: this must NOT be in upgrade_b2evo_tables(), otherwise it will mess with the longer setting used by the auto upgrade feature. if (set_max_execution_time(300) === false) { // max_execution_time ini setting could not be changed for this script, display a warning $manual_url = 'href="' . get_manual_url('blank-or-partial-page') . '" target = "_blank"'; echo '<div class="text-warning"><evo:warning>' . sprintf(T_('WARNING: the max_execution_time is set to %s seconds in php.ini and cannot be increased automatically. This may lead to a PHP <a %s>timeout causing the upgrade to fail</a>. If so please post a screenshot to the <a %s>forums</a>.'), ini_get('max_execution_time'), $manual_url, 'href="http://forums.b2evolution.net/"') . '</evo:warning></div>'; } echo '<h2>' . T_('Upgrading data in existing b2evolution database...') . '</h2>'; evo_flush(); $is_automated_upgrade = $action !== 'evoupgrade'; $upgrade_result = upgrade_b2evo_tables($action); if ($upgrade_result === 'need-fix') { // We are waiting for the user to click on "try to repair/upgrade now"... // We already displayed the orange upgrade button. Offer an alternative: // A link back to install menu display_install_back_link(); } elseif ($upgrade_result === true) { if ($is_automated_upgrade) { // After successful auto_upgrade or svn_upgrade we must remove files/folder based on the upgrade_policy.conf remove_after_upgrade(); // disable maintenance mode at the end of the upgrade script switch_maintenance_mode(false, 'upgrade'); } // Update the progress bar status update_install_progress_bar(); $upgrade_result_title = T_('Upgrade completed successfully!');
/** * Test upgrade from 4.1 ("strict" MySQL mode) */ function testUpgradeFrom4_1_strict() { echo '<h2>Upgrading from v4.1</h2>'; $this->executeQueriesFromFile(TESTSDIR . 'install/sql/b2evolution_v4.1.sql'); $this->test_DB->query('SET sql_mode = "TRADITIONAL"'); $this->assertTrue(upgrade_b2evo_tables(), 'Upgrade from 4.1 in strict mode successful!'); }