public static function doFinish() { $upgrade = new CRM_Upgrade_Form(); list($ignore, $latestVer) = $upgrade->getUpgradeVersions(); // Seems extraneous in context, but we'll preserve old behavior $upgrade->setVersion($latestVer); // lets rebuild the config array in case we've made a few changes in the // code base // this also helps us always store the latest version of civi in the DB $params = array(); CRM_Core_BAO_ConfigSetting::add($params); // CRM-12804 comment-51411 : add any missing settings // at the end of upgrade CRM_Core_BAO_Setting::updateSettingsFromMetaData(); // cleanup caches CRM-8739 $config = CRM_Core_Config::singleton(); $config->cleanupCaches(1); // Rebuild all triggers and re-enable logging if needed $logging = new CRM_Logging_Schema(); $logging->fixSchemaDifferences(); //CRM-16257 update Config.IDS.ini might be an old copy CRM_Core_IDS::createConfigFile(TRUE); }
/** * @param bool $triggerRebuild * @param bool $sessionReset * * @throws Exception */ public static function rebuildMenuAndCaches($triggerRebuild = FALSE, $sessionReset = FALSE) { $config = CRM_Core_Config::singleton(); $config->clearModuleList(); // also cleanup all caches $config->cleanupCaches($sessionReset || CRM_Utils_Request::retrieve('sessionReset', 'Boolean', CRM_Core_DAO::$_nullObject, FALSE, 0, 'GET')); CRM_Core_Menu::store(); // also reset navigation CRM_Core_BAO_Navigation::resetNavigation(); // also cleanup module permissions $config->cleanupPermissions(); // rebuild word replacement cache - pass false to prevent operations redundant with this fn CRM_Core_BAO_WordReplacement::rebuild(FALSE); Civi::service('settings_manager')->flush(); // Clear js caches CRM_Core_Resources::singleton()->flushStrings()->resetCacheCode(); CRM_Case_XMLRepository::singleton(TRUE); // also rebuild triggers if requested explicitly if ($triggerRebuild || CRM_Utils_Request::retrieve('triggerRebuild', 'Boolean', CRM_Core_DAO::$_nullObject, FALSE, 0, 'GET')) { CRM_Core_DAO::triggerRebuild(); } CRM_Core_DAO_AllCoreTables::reinitializeCache(TRUE); CRM_Core_ManagedEntities::singleton(TRUE)->reconcile(); //CRM-16257 update Config.IDS.ini might be an old copy CRM_Core_IDS::createConfigFile(TRUE); }
public static function doFinish() { $upgrade = new CRM_Upgrade_Form(); list($ignore, $latestVer) = $upgrade->getUpgradeVersions(); // Seems extraneous in context, but we'll preserve old behavior $upgrade->setVersion($latestVer); // Clear cached metadata. Civi::service('settings_manager')->flush(); // cleanup caches CRM-8739 $config = CRM_Core_Config::singleton(); $config->cleanupCaches(1); // Rebuild all triggers and re-enable logging if needed $logging = new CRM_Logging_Schema(); $logging->fixSchemaDifferences(); //CRM-16257 update Config.IDS.ini might be an old copy CRM_Core_IDS::createConfigFile(TRUE); }