From b5e56a710b4bf25ed7b186c2cb9ea6e822db8fa3 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 1 Feb 2009 16:48:08 +0100 Subject: [PATCH] Add a parameter to allow recompilation of templates that changed when not in debug mode. Signed-off-by: Florent Bruneau --- classes/plglobals.php | 6 ++++++ classes/plpage.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/classes/plglobals.php b/classes/plglobals.php index 5185836..9818db1 100644 --- a/classes/plglobals.php +++ b/classes/plglobals.php @@ -64,6 +64,12 @@ class PlGlobals // 'r' => read/only // '' => site down + /** Tell smarty to check the timestamps of the templates to decide + * whether recompile the template or not. If this option is false and + * debug mode is not activate, templates won't be recompile if they changed. + */ + public $smarty_autocompile = false; + /** BaseURL of the site. * This is read from the HTTP headers if available but you MUST give a * default value for this field in you configuration file (because, this diff --git a/classes/plpage.php b/classes/plpage.php index 234cdb1..cc932a6 100644 --- a/classes/plpage.php +++ b/classes/plpage.php @@ -49,7 +49,7 @@ abstract class PlPage extends Smarty $globals->spoolroot . '/plugins/'); $this->config_dir = $globals->spoolroot . '/configs/'; - $this->compile_check = !empty($globals->debug); + $this->compile_check = !empty($globals->debug) || $globals->smarty_autocompile; $this->_errors = array('errors' => array()); $this->_jsonVars = array(); -- 2.1.4