summaryrefslogtreecommitdiff
path: root/libs/sysplugins/smarty_internal_compile_extends.php
diff options
context:
space:
mode:
authoruwe.tews@googlemail.com <uwe.tews@googlemail.com>2010-11-20 00:00:24 +0000
committeruwe.tews@googlemail.com <uwe.tews@googlemail.com>2010-11-20 00:00:24 +0000
commit1c9f015135d51a194db58bbaa5e7ce56dd078e55 (patch)
tree9d57ca1fdf7c0d7f6115c27a599c68aac6cde8b1 /libs/sysplugins/smarty_internal_compile_extends.php
parenteddb3019470ab65f13c49de2fd98db175fac3e11 (diff)
downloadsmarty-1c9f015135d51a194db58bbaa5e7ce56dd078e55.tar.gz
smarty-1c9f015135d51a194db58bbaa5e7ce56dd078e55.tar.bz2
smarty-1c9f015135d51a194db58bbaa5e7ce56dd078e55.zip
- bugfix on block plugins with modifiers
- bugfix on template inheritance. prefilter did not run over child blocks
Diffstat (limited to 'libs/sysplugins/smarty_internal_compile_extends.php')
-rw-r--r--libs/sysplugins/smarty_internal_compile_extends.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/sysplugins/smarty_internal_compile_extends.php b/libs/sysplugins/smarty_internal_compile_extends.php
index 3d3ac797..8d0049e6 100644
--- a/libs/sysplugins/smarty_internal_compile_extends.php
+++ b/libs/sysplugins/smarty_internal_compile_extends.php
@@ -53,7 +53,12 @@ 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 = substr($compiler->template->template_source,$compiler->lex->counter-1);
+ $_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);
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');