X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FSystem.php;h=d92b359d7e031a44d7325c2175d2a69239cd7233;hb=693067e365915ce280217047009c9e87d70d0719;hp=addc25b46bff0749dd61b30c213bce2acf863d37;hpb=5a02d44584b93eaa6af12f8dae2bffaf6a24e99e;p=civicrm-core.git diff --git a/CRM/Utils/System.php b/CRM/Utils/System.php index addc25b46b..d92b359d7e 100644 --- a/CRM/Utils/System.php +++ b/CRM/Utils/System.php @@ -38,6 +38,7 @@ * @method static array synchronizeUsers() Create CRM contacts for all existing CMS users. * @method static void appendCoreResources(\Civi\Core\Event\GenericHookEvent $e) Callback for hook_civicrm_coreResourceList. * @method static void alterAssetUrl(\Civi\Core\Event\GenericHookEvent $e) Callback for hook_civicrm_getAssetUrl. + * @method static exitAfterFatal() Should the current execution exit after a fatal error? */ class CRM_Utils_System { @@ -753,18 +754,6 @@ class CRM_Utils_System { public static function authenticate($name, $password, $loadCMSBootstrap = FALSE, $realPath = NULL) { $config = CRM_Core_Config::singleton(); - /* Before we do any loading, let's start the session and write to it. - * We typically call authenticate only when we need to bootstrap the CMS - * directly via Civi and hence bypass the normal CMS auth and bootstrap - * process typically done in CLI and cron scripts. See: CRM-12648 - * - * Q: Can we move this to the userSystem class so that it can be tuned - * per-CMS? For example, when dealing with UnitTests UF, does it need to - * do this session write since the original issue was for Drupal. - */ - $session = CRM_Core_Session::singleton(); - $session->set('civicrmInitSession', TRUE); - return $config->userSystem->authenticate($name, $password, $loadCMSBootstrap, $realPath); } @@ -1498,13 +1487,7 @@ class CRM_Utils_System { // a bit aggressive, but livable for now CRM_Utils_Cache::singleton()->flush(); - // Traditionally, systems running on memory-backed caches were quite - // zealous about destroying *all* memory-backed caches during a flush(). - // These flushes simulate that legacy behavior. However, they should probably - // be removed at some point. - $localDrivers = ['CRM_Utils_Cache_ArrayCache', 'CRM_Utils_Cache_NoCache']; - if (Civi\Core\Container::isContainerBooted() - && !in_array(get_class(CRM_Utils_Cache::singleton()), $localDrivers)) { + if (Civi\Core\Container::isContainerBooted()) { Civi::cache('long')->flush(); Civi::cache('settings')->flush(); Civi::cache('js_strings')->flush(); @@ -1514,6 +1497,7 @@ class CRM_Utils_System { Civi::cache('customData')->flush(); Civi::cache('contactTypes')->clear(); Civi::cache('metadata')->clear(); + \Civi\Core\ClassScanner::cache('index')->flush(); CRM_Extension_System::singleton()->getCache()->flush(); CRM_Cxn_CiviCxnHttp::singleton()->getCache()->flush(); }