From 4e98b48c7cce56e00d0e985094c871e25a33c5af Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Wed, 18 Nov 2009 17:43:39 +0000 Subject: [PATCH] - make $smarty->_current_file available during compilation for Smarty2 BC --- change_log.txt | 1 + libs/sysplugins/smarty_internal_templatecompilerbase.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index 5455deb3..599fd29b 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@ 11/18/2009 - observe umask settings when setting file permissions - avoide unneeded cache file creation for subtemplates which did occur in some situations +- make $smarty->_current_file available during compilation for Smarty2 BC 11/17/2009 - sanitize compile_id and cache_id (replace illegal chars with _) diff --git a/libs/sysplugins/smarty_internal_templatecompilerbase.php b/libs/sysplugins/smarty_internal_templatecompilerbase.php index 273d9c01..e501fb31 100644 --- a/libs/sysplugins/smarty_internal_templatecompilerbase.php +++ b/libs/sysplugins/smarty_internal_templatecompilerbase.php @@ -47,7 +47,8 @@ class Smarty_Internal_TemplateCompilerBase { // assume successfull compiling $this->compile_error = false; // save template object in compiler class - $this->template = $template; + $this->template = $template; + $this->smarty->_current_file = $this->template->getTemplateFilepath(); // template header code $template_header = ''; if (!$template->suppressHeader) {