From dea3e1f83e2f09643e73e1b4d7d19a005f8a48fb Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Sat, 19 Feb 2011 00:20:45 +0000 Subject: [PATCH] - bugfix force default debug.tpl to be loaded by the file resource when default_resource_type was modified --- change_log.txt | 1 + libs/Smarty.class.php | 2 +- libs/sysplugins/smarty_internal_templatecompilerbase.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index 93a5fa46..2d119deb 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@ ===== SVN trunk ===== 18/02/2011 - bugfix removed possible race condition when isCached() was called for an individually cached subtemplate +- bugfix force default debug.tpl to be loaded by the file resource when default_resource_type was modified 17/02/2011 -improvement not to delete files starting with '.' from cache and template_c folders on clearCompiledTemplate() and clearCache() diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 75a1164b..63f816d3 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -258,7 +258,7 @@ class Smarty extends Smarty_Internal_Data { $this->plugins_dir = array(SMARTY_PLUGINS_DIR); $this->cache_dir = '.' . DS . 'cache' . DS; $this->config_dir = '.' . DS . 'configs' . DS; - $this->debug_tpl = SMARTY_DIR . 'debug.tpl'; + $this->debug_tpl = 'file:' . SMARTY_DIR . 'debug.tpl'; if (isset($_SERVER['SCRIPT_NAME'])) { $this->assignGlobal('SCRIPT_NAME', $_SERVER['SCRIPT_NAME']); } diff --git a/libs/sysplugins/smarty_internal_templatecompilerbase.php b/libs/sysplugins/smarty_internal_templatecompilerbase.php index 76cec5dc..f33c131f 100644 --- a/libs/sysplugins/smarty_internal_templatecompilerbase.php +++ b/libs/sysplugins/smarty_internal_templatecompilerbase.php @@ -307,7 +307,7 @@ class Smarty_Internal_TemplateCompilerBase { } else { if (isset($this->template->required_plugins['compiled'][$plugin_name][$type])) { $function = $this->template->required_plugins['compiled'][$plugin_name][$type]['function']; - } else if (isset($this->template->required_plugins['compiled'][$plugin_name][$type])) { + } else if (isset($this->template->required_plugins['nocache'][$plugin_name][$type])) { $this->template->required_plugins['compiled'][$plugin_name][$type] = $this->template->required_plugins['nocache'][$plugin_name][$type]; $function = $this->template->required_plugins['compiled'][$plugin_name][$type]['function']; }