X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FExtension%2FClassLoader.php;h=d0845911e023305ef5f24e2413ab209cbbec53dc;hb=079546f5c07403d7e280bdde7faad73c0ab63bfb;hp=833573849c59be17e8abfd2c5ed7ac972f3523ac;hpb=aebbcca99b6fe1be7dff8d1306d62a91fc8d3328;p=civicrm-core.git diff --git a/CRM/Extension/ClassLoader.php b/CRM/Extension/ClassLoader.php index 833573849c..d0845911e0 100644 --- a/CRM/Extension/ClassLoader.php +++ b/CRM/Extension/ClassLoader.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2018 | + | Copyright CiviCRM LLC (c) 2004-2019 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -29,7 +29,7 @@ * * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2018 + * @copyright CiviCRM LLC (c) 2004-2019 * $Id$ * */ @@ -77,7 +77,7 @@ class CRM_Extension_ClassLoader { */ public function register() { // In pre-installation environments, don't bother with caching. - if (!defined('CIVICRM_TEMPLATE_COMPILEDIR') || !defined('CIVICRM_DSN') || defined('CIVICRM_TEST') || \CRM_Utils_System::isInUpgradeMode()) { + if (!defined('CIVICRM_DSN') || defined('CIVICRM_TEST') || \CRM_Utils_System::isInUpgradeMode()) { return $this->buildClassLoader()->register(); } @@ -89,7 +89,7 @@ class CRM_Extension_ClassLoader { $loader = $this->buildClassLoader(); $ser = serialize($loader); file_put_contents($file, - sprintf("register(); @@ -146,7 +146,7 @@ class CRM_Extension_ClassLoader { */ protected function getCacheFile() { $envId = \CRM_Core_Config_Runtime::getId(); - $file = CIVICRM_TEMPLATE_COMPILEDIR . "/CachedExtLoader.{$envId}.php"; + $file = \Civi::paths()->getPath("[civicrm.compile]/CachedExtLoader.{$envId}.php"); return $file; }