public function testRepairUpgradeHistoryTable() { repairUpgradeHistoryTable(); $file = $GLOBALS['db']->getOne("SELECT filename FROM upgrade_history WHERE id = '{$this->new_upgrade->id}'"); $this->assertEquals('upload/upgrade/temp/Bug51721Test.zip', $file); $file = $GLOBALS['db']->getOne("SELECT filename FROM upgrade_history WHERE id = '{$this->new_upgrade2->id}'"); $this->assertEquals('upload/upgrade/temp/Bug51721Test.zip', $file); }
merge_config_si_settings(true, '', '', $path); logThis('End merge_config_si_settings', $path); //Upgrade connectors logThis('Begin upgrade_connectors', $path); upgrade_connectors(); logThis('End upgrade_connectors', $path); //Unlink files that have been removed if (function_exists('unlinkUpgradeFiles')) { unlinkUpgradeFiles($sugar_version); } if (function_exists('rebuildSprites') && function_exists('imagecreatetruecolor')) { rebuildSprites(true); } //Run repairUpgradeHistoryTable if (version_compare($sugar_version, '6.5.0', '<') && function_exists('repairUpgradeHistoryTable')) { repairUpgradeHistoryTable(); } /////////////////////////////////////////////////////////////////////////////// //// TAKE OUT TRASH if (empty($errors)) { set_upgrade_progress('end', 'in_progress', 'unlinkingfiles', 'in_progress'); logThis('Taking out the trash, unlinking temp files.', $path); unlinkUWTempFiles(); removeSilentUpgradeVarsCache(); logThis('Taking out the trash, done.', $path); } /////////////////////////////////////////////////////////////////////////////// //// RECORD ERRORS $phpErrors = ob_get_contents(); ob_end_clean(); logThis("**** Potential PHP generated error messages: {$phpErrors}", $path);