- code optimizations

This commit is contained in:
Uwe.Tews
2010-02-28 12:50:33 +00:00
parent ed2458e9ae
commit 428889e762
6 changed files with 70 additions and 59 deletions
@@ -45,7 +45,7 @@ class Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_Compi
$this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache;
// compile code
if (is_array($function)) {
$output = "<?php \$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}', {$_params}); \$_block_repeat=true; call_user_func_array(array('{$function[0]}','{$function[1]}'),(array({$_params}, null, \$_smarty_tpl->smarty, \$_block_repeat, \$_smarty_tpl));while (\$_block_repeat) { ob_start();?>";
$output = "<?php \$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}', {$_params}); \$_block_repeat=true; call_user_func(array('{$function[0]}','{$function[1]}'),{$_params}, null, \$_smarty_tpl->smarty, \$_block_repeat, \$_smarty_tpl);while (\$_block_repeat) { ob_start();?>";
} else {
$output = "<?php \$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}', {$_params}); \$_block_repeat=true; {$function}({$_params}, null, \$_smarty_tpl->smarty, \$_block_repeat, \$_smarty_tpl);while (\$_block_repeat) { ob_start();?>";
}
@@ -60,7 +60,7 @@ class Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_Compi
$this->compiler->has_output = true;
// compile code
if (is_array($function)) {
$output = "<?php \$_block_content = ob_get_clean(); \$_block_repeat=false; echo call_user_func_array(array('{$function[0]}','{$function[1]}'),(array({$_params}, \$_block_content, \$_smarty_tpl->smarty, \$_block_repeat, \$_smarty_tpl)); } array_pop(\$_smarty_tpl->smarty->_tag_stack);?>";
$output = "<?php \$_block_content = ob_get_clean(); \$_block_repeat=false; echo call_user_func(array('{$function[0]}','{$function[1]}'),({$_params}, \$_block_content, \$_smarty_tpl->smarty, \$_block_repeat, \$_smarty_tpl); } array_pop(\$_smarty_tpl->smarty->_tag_stack);?>";
} else {
$output = "<?php \$_block_content = ob_get_clean(); \$_block_repeat=false; echo {$function}({$_params}, \$_block_content, \$_smarty_tpl->smarty, \$_block_repeat, \$_smarty_tpl); } array_pop(\$_smarty_tpl->smarty->_tag_stack);?>";
}
@@ -69,4 +69,4 @@ class Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_Compi
}
}
?>
?>