X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FSmarty.php;h=bef5152c5770252d70a6d770d9e0591e5ae9a0a8;hb=b999b43f3396ce49d06c44337758ac8345b5258e;hp=bea2363ddd05309656741de04921dd048919951b;hpb=f29d38d9a7c94559f8de59281cc9abd6513af159;p=civicrm-core.git diff --git a/CRM/Core/Smarty.php b/CRM/Core/Smarty.php index bea2363ddd..bef5152c57 100644 --- a/CRM/Core/Smarty.php +++ b/CRM/Core/Smarty.php @@ -144,6 +144,8 @@ class CRM_Core_Smarty extends Smarty { $this->plugins_dir = [$smartyDir . 'plugins', $pluginsDir]; } + $this->compile_check = $this->isCheckSmartyIsCompiled(); + // add the session and the config here $session = CRM_Core_Session::singleton(); @@ -340,4 +342,14 @@ class CRM_Core_Smarty extends Smarty { return 'en_US'; } + /** + * Get the compile_check value. + * + * @return bool + */ + private function isCheckSmartyIsCompiled() { + // check for define in civicrm.settings.php as FALSE, otherwise returns TRUE + return CRM_Utils_Constant::value('CIVICRM_TEMPLATE_COMPILE_CHECK', TRUE); + } + }