From 8e4cd21b3d27f6c5d103a557ebdaca9b9adbd33c Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Sat, 20 Nov 2010 15:24:32 +0000 Subject: [PATCH] revert change of 19/11/2010 - bugfix on template inheritance. prefilter did not run over child blocks It was no error --- change_log.txt | 1 - libs/sysplugins/smarty_internal_compile_extends.php | 7 +------ libs/sysplugins/smarty_internal_resource_extends.php | 4 ---- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/change_log.txt b/change_log.txt index d46dfba2..acbd34e3 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,5 @@ 19/11/2010 - bugfix on block plugins with modifiers -- bugfix on template inheritance. prefilter did not run over child blocks 18/11/2010 - change on handling of unassigned template variable -- default will drop E_NOTICE diff --git a/libs/sysplugins/smarty_internal_compile_extends.php b/libs/sysplugins/smarty_internal_compile_extends.php index 8d0049e6..3d3ac797 100644 --- a/libs/sysplugins/smarty_internal_compile_extends.php +++ b/libs/sysplugins/smarty_internal_compile_extends.php @@ -53,12 +53,7 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase { $this->compiler->trigger_template_error("illegal recursive call of \"{$include_file}\"",$compiler->lex->line-1); } $compiler->template->properties['file_dependency'][$template_sha1] = array($_template->getTemplateFilepath(), $_template->getTemplateTimestamp(),$_template->resource_type); - $_content = $compiler->template->template_source; - // run prefilter if required - if (isset($this->smarty->autoload_filters['pre']) || isset($this->smarty->registered_filters['pre'])) { - $_content = Smarty_Internal_Filter_Handler::runFilter('pre', $_content, $this->smarty, $compiler->template); - } - $_content = substr($_content,$compiler->lex->counter-1); + $_content = substr($compiler->template->template_source,$compiler->lex->counter-1); if (preg_match_all("!({$this->_ldl}block\s(.+?){$this->_rdl})!", $_content, $s) != preg_match_all("!({$this->_ldl}/block{$this->_rdl})!", $_content, $c)) { $this->compiler->trigger_template_error('unmatched {block} {/block} pairs'); diff --git a/libs/sysplugins/smarty_internal_resource_extends.php b/libs/sysplugins/smarty_internal_resource_extends.php index 8963d5d2..74dc0f9b 100644 --- a/libs/sysplugins/smarty_internal_resource_extends.php +++ b/libs/sysplugins/smarty_internal_resource_extends.php @@ -102,10 +102,6 @@ class Smarty_Internal_Resource_Extends { } $_template->template_filepath = $_filepath; $_content = file_get_contents($_filepath); - // run prefilter if required - if (isset($this->smarty->autoload_filters['pre']) || isset($this->smarty->registered_filters['pre'])) { - $_content = Smarty_Internal_Filter_Handler::runFilter('pre', $_content, $this->smarty, $compiler->template); - } if ($_filepath != $_last) { if (preg_match_all("!({$this->_ldl}block\s(.+?){$this->_rdl})!", $_content, $_open) != preg_match_all("!({$this->_ldl}/block{$this->_rdl})!", $_content, $_close)) {