cvs: smarty /libs Smarty_Compiler.class.php
"Messju Mohr" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmessju1075244427@cvsserver> |
messju Tue Jan 27 18:00:27 2004 EDT
Modified files:
/smarty/libs Smarty_Compiler.class.php
Log:
removed use of temporary var $_params in compiled code of block-plugins
http://cvs.php.net/diff.php/smarty/libs/Smarty_Compiler.class.php?r1=1.310&r2=1.311&ty=u
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.310 smarty/libs/Smarty_Compiler.class.php:1.311
--- smarty/libs/Smarty_Compiler.class.php:1.310 Sun Jan 25 10:39:10 2004
+++ smarty/libs/Smarty_Compiler.class.php Tue Jan 27 18:00:26 2004
@@ -39,7 +39,7 @@
* @package Smarty
*/
-/* $Id: Smarty_Compiler.class.php,v 1.310 2004/01/25 15:39:10 messju Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.311 2004/01/27 23:00:26 messju Exp $ */
/**
* Template compiling class
@@ -711,8 +711,8 @@
$output = '<?php ' . $this->_push_cacheable_state('block', $tag_command);
$attrs = $this->_parse_attrs($tag_args);
$arg_list = $this->_compile_arg_list('block', $tag_command, $attrs, $_cache_attrs='');
- $output .= "$_cache_attrs\$_params = \$this->_tag_stack[] = array('$tag_command', array(".implode(',', $arg_list).')); ';
- $output .= $this->_compile_plugin_call('block', $tag_command).'($_params[1], null, $this, $_block_repeat=true); unset($_params);';
+ $output .= "$_cache_attrs\$this->_tag_stack[] = array('$tag_command', array(".implode(',', $arg_list).')); ';
+ $output .= $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat=true);';
$output .= 'while ($_block_repeat) { ob_start(); ?>';
} else {
$output = '<?php $this->_block_content = ob_get_contents(); ob_end_clean(); ';
@@ -1887,7 +1887,6 @@
$_map_array = true;
}
- $this->_add_plugin('modifier', $_modifier_name);
if (empty($this->_plugins['modifier'][$_modifier_name])
&& !$this->_get_plugin_filepath('modifier', $_modifier_name)
&& function_exists($_modifier_name)) {
@@ -1897,6 +1896,7 @@
$this->_plugins['modifier'][$_modifier_name] = array($_modifier_name, null, null, false);
}
}
+ $this->_add_plugin('modifier', $_modifier_name);
$this->_parse_vars_props($_modifier_args);
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php