From: Florent Bruneau Date: Sun, 1 Feb 2009 15:48:08 +0000 (+0100) Subject: Add a parameter to allow recompilation of templates that changed when not X-Git-Tag: core/1.0.1~21 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=b5e56a710b4bf25ed7b186c2cb9ea6e822db8fa3;p=platal.git Add a parameter to allow recompilation of templates that changed when not in debug mode. Signed-off-by: Florent Bruneau --- 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();