X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=CRM%2FCore%2FSmarty.php;h=bef5152c5770252d70a6d770d9e0591e5ae9a0a8;hb=9aef96d165f8012e103624a9e7b3133d77e8e69e;hp=06b05313e3c301d78830dff102ef5a9f4b28ade9;hpb=594eddc519b33992b5f046fa91627c87966e2527;p=civicrm-core.git diff --git a/CRM/Core/Smarty.php b/CRM/Core/Smarty.php index 06b05313e3..bef5152c57 100644 --- a/CRM/Core/Smarty.php +++ b/CRM/Core/Smarty.php @@ -73,7 +73,11 @@ class CRM_Core_Smarty extends Smarty { static private $_singleton = NULL; /** - * @var array (string $name => mixed $value) a list of variables ot save temporarily + * Backup frames. + * + * A list of variables ot save temporarily in format (string $name => mixed $value). + * + * @var array */ private $backupFrames = []; @@ -140,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(); @@ -336,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); + } + }