mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
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:
@@ -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
|
||||
|
@@ -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');
|
||||
|
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user