- bugfix on block plugins with modifiers

- bugfix on template inheritance. prefilter did not run over child blocks
This commit is contained in:
uwe.tews@googlemail.com
2010-11-20 00:00:24 +00:00
parent eddb301947
commit 1c9f015135
8 changed files with 786 additions and 756 deletions
@@ -63,7 +63,13 @@ class Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_Compi
// This tag does create output
$this->compiler->has_output = true;
// compile code
$output = "<?php \$_block_content = ob_get_clean(); \$_block_repeat=false; echo {$function}({$_params}, \$_block_content, \$_smarty_tpl, \$_block_repeat); } array_pop(\$_smarty_tpl->smarty->_tag_stack);?>";
if (!isset($parameter['modifier_list'])) {
$mod_pre = $mod_post ='';
} else {
$mod_pre = ' ob_start(); ';
$mod_post = 'echo '.$this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$parameter['modifier_list'],'value'=>'ob_get_clean()')).';';
}
$output = "<?php \$_block_content = ob_get_clean(); \$_block_repeat=false;".$mod_pre." echo {$function}({$_params}, \$_block_content, \$_smarty_tpl, \$_block_repeat); ".$mod_post." } array_pop(\$_smarty_tpl->smarty->_tag_stack);?>";
}
return $output . "\n";
}