Пример #1
0
 public function run()
 {
     if (!$this->toFlavor('pro')) {
         return;
     }
     if (!version_compare($this->from_version, '7.0', "<")) {
         return;
     }
     require_once 'modules/Forecasts/ForecastsDefaults.php';
     ForecastsDefaults::setupForecastSettings(true, $this->from_version, $this->to_version);
     ForecastsDefaults::upgradeColumns();
 }
Пример #2
0
upgrade_connectors();
logThis('End upgrade_connectors', $path);
//Unlink files that have been removed
if (function_exists('unlinkUpgradeFiles')) {
    unlinkUpgradeFiles($sugar_version, $path);
}
if (function_exists('rebuildSprites') && function_exists('imagecreatetruecolor')) {
    rebuildSprites(true);
}
//Patch for bug57431 : Module name isn't updated in portal layout editor
updateRenamedModulesLabels();
//setup forecast defualt settings
if (version_compare($sugar_version, '6.7.0', '<')) {
    require_once clean_path($unzip_dir . '/scripts/upgrade_utils.php');
    require_once $unzip_dir . '/' . $zip_from_dir . '/modules/Forecasts/ForecastsDefaults.php';
    ForecastsDefaults::setupForecastSettings(true, $sugar_version, getUpgradeVersion());
    ForecastsDefaults::upgradeColumns();
    // do the config update to add the 'support' platform to any config with the category of 'portal'
    updatePortalConfigToContainPlatform();
}
// Bug 57216 - Upgrade wizard dying on metadata upgrader because needed files were
// already called but news needed to replace them. This moves the metadata upgrader
// later in the process - rgonzalez
logThis('Checking for mobile/portal metadata upgrade...');
// 6.6 metadata enhancements for portal and wireless, should only be
// handled for upgrades FROM pre-6.6 to a version POST 6.6 and MUST be
// handled AFTER inclusion of the upgrade package files
if (!didThisStepRunBefore('commit', 'upgradePortalMobileMetadata')) {
    if (version_compare($sugar_version, '6.6.0', '<')) {
        if (file_exists('modules/UpgradeWizard/SidecarUpdate/SidecarMetaDataUpgrader.php')) {
            set_upgrade_progress('commit', 'in_progress', 'upgradePortalMobileMetadata', 'in_progress');
Пример #3
0
}
//Run repairUpgradeHistoryTable
if (version_compare($_SESSION['current_db_version'], '6.5.0', '<') && function_exists('repairUpgradeHistoryTable')) {
    repairUpgradeHistoryTable();
}
require_once 'modules/Administration/upgrade_custom_relationships.php';
upgrade_custom_relationships();
$rac->clearVardefs();
$rac->rebuildExtensions();
require_once 'modules/UpgradeWizard/uw_utils.php';
//Patch for bug57431 : Module name isn't updated in portal layout editor
updateRenamedModulesLabels();
//setup forecast defualt settings
if (version_compare($_SESSION['current_db_version'], '6.7.0', '<')) {
    require_once 'modules/Forecasts/ForecastsDefaults.php';
    ForecastsDefaults::setupForecastSettings(true, $_SESSION['current_db_version'], $_SESSION['target_db_version']);
    ForecastsDefaults::upgradeColumns();
    // do the config update to add the 'support' platform to any config with the category of 'portal'
    updatePortalConfigToContainPlatform();
}
//Update the license
logThis('Start Updating the license ', $path);
ob_start();
check_now(get_sugarbeat());
ob_end_clean();
logThis('End Updating the license ', $path);
set_upgrade_progress('end', 'done');
logThis('Cleaning up the session.  Goodbye.');
unlinkUWTempFiles();
logThis('Cleaning up the session.  Goodbye.');
resetUwSession();
Пример #4
0
echo "<b>{$mod_strings['LBL_PERFORM_CREATE_DEFAULT']}</b><br>";
echo "<br>";
installLog("Begin creating Defaults");
installerHook('pre_createDefaultSettings');
if ($new_config) {
    installLog("insert defaults into config table");
    insert_default_settings();
}
installerHook('post_createDefaultSettings');
echo $line_entry_format . $mod_strings['LBL_PERFORM_LICENSE_SETTINGS'] . $line_exit_format;
installLog($mod_strings['LBL_PERFORM_LICENSE_SETTINGS']);
update_license_settings($_SESSION['setup_license_key_users'], $_SESSION['setup_license_key_expire_date'], $_SESSION['setup_license_key'], $_SESSION['setup_num_lic_oc']);
echo $mod_strings['LBL_PERFORM_DONE'];
//Install forecasts configuration
require_once 'modules/Forecasts/ForecastsDefaults.php';
$forecast_config = ForecastsDefaults::setupForecastSettings();
//Install Opportunities configuration
require_once 'modules/Opportunities/OpportunitiesDefaults.php';
$opps_config = OpportunitiesDefaults::setupOpportunitiesSettings();
unset($opps_config);
installerHook('pre_createUsers');
if ($new_tables) {
    echo $line_entry_format . $mod_strings['LBL_PERFORM_DEFAULT_USERS'] . $line_exit_format;
    installLog($mod_strings['LBL_PERFORM_DEFAULT_USERS']);
    create_default_users();
    echo $mod_strings['LBL_PERFORM_DONE'];
} else {
    echo $line_entry_format . $mod_strings['LBL_PERFORM_ADMIN_PASSWORD'] . $line_exit_format;
    installLog($mod_strings['LBL_PERFORM_ADMIN_PASSWORD']);
    $db->setUserName($setup_db_sugarsales_user);
    $db->setUserPassword($setup_db_sugarsales_password);