X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FSmarty.php;h=bef5152c5770252d70a6d770d9e0591e5ae9a0a8;hb=9aef96d165f8012e103624a9e7b3133d77e8e69e;hp=bea2363ddd05309656741de04921dd048919951b;hpb=4a9c753471414d74068bd8109d2586554ad7132b;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); + } + }