added &$repeat-paramter to block-functions

This commit is contained in:
messju
2003-04-20 13:04:42 +00:00
parent 51b8d2b854
commit efd4ed83b5
2 changed files with 10 additions and 8 deletions

1
NEWS
View File

@@ -1,3 +1,4 @@
- added &$repeat-paramter to block-functions (messju)
- enabled hex-constants in function.math.php (messju)
- enabled hex-constants (0x...) as function-attributes, inside if-statements
and as modifier-parameters (messju)

View File

@@ -646,14 +646,16 @@ class Smarty_Compiler extends Smarty {
$arg_list[] = "'$arg_name' => $arg_value";
}
$output = "<?php \$this->_tag_stack[] = array('$tag_command', array(".implode(',', (array)$arg_list).")); ".$this->_compile_plugin_call('block', $tag_command).'(array('.implode(',', (array)$arg_list)."), null, \$this); ob_start(); ?>";
$output = "<?php \$this->_tag_stack[] = array('$tag_command', array(".implode(',', (array)$arg_list).')); ';
$output .= $this->_compile_plugin_call('block', $tag_command).'(array('.implode(',', (array)$arg_list).'), null, $this, $_block_repeat=true);';
$output .= 'while ($_block_repeat) { ob_start(); ?>';
} else {
$output = "<?php \$this->_block_content = ob_get_contents(); ob_end_clean(); ";
$out_tag_text = $this->_compile_plugin_call('block', $tag_command)."(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$this->_block_content, \$this)";
$output = '<?php $this->_block_content = ob_get_contents(); ob_end_clean(); ';
$_out_tag_text = $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], $this->_block_content, $this, $_block_repeat=false)';
if ($tag_modifier != '') {
$this->_parse_modifiers($out_tag_text, $tag_modifier);
$this->_parse_modifiers($_out_tag_text, $tag_modifier);
}
$output .= 'echo ' . $out_tag_text . ';';
$output .= 'echo '.$_out_tag_text.'; } ';
$output .= " array_pop(\$this->_tag_stack); ?>";
}
@@ -1821,7 +1823,6 @@ class Smarty_Compiler extends Smarty {
}
}
/**
* load pre- and post-filters
*/