From 8cf163198aa44106a4a43e2cf37386ae117c4841 Mon Sep 17 00:00:00 2001 From: mohrt Date: Tue, 11 Mar 2003 15:31:22 +0000 Subject: [PATCH] fix config file recompiling code --- NEWS | 2 ++ libs/Smarty.class.php | 8 ++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 0c2c8519..e4a96738 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - fix bug that makes config files recompile every time + (Nagger, Monte) - add dpi functionality to html_image, change "name" parameter to "file" (Thomas Shulz, Monte) - fix height/width parameter index in html_image (Gerard, diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 7149757d..ee387532 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -1301,13 +1301,9 @@ class Smarty $_compile_config = true; } else { include($_compile_file); - if(!empty($_config_vars)) { - $_compile_config = true; - } else { - $_compile_config = false; - } + $_compile_config = empty($_config_vars); } - + if($_compile_config) { if(!is_object($this->_conf_obj)) { require_once SMARTY_DIR . $this->config_class . '.class.php';