revert change of 19/11/2010 - bugfix on template inheritance. prefilter did not run over child blocks

It was no error
This commit is contained in:
uwe.tews@googlemail.com
2010-11-20 15:24:32 +00:00
parent 1c9f015135
commit 8e4cd21b3d
3 changed files with 1 additions and 11 deletions

View File

@@ -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

View File

@@ -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');

View File

@@ -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)) {