mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-03 19:30:49 +02:00
- bugfix on block plugins with modifiers
- bugfix on template inheritance. prefilter did not run over child blocks
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user