cvs: smarty /libs Smarty.class.php Smarty_Compiler.class.php

From: Date: Tue, 17 Jun 2003 15:23:25 +0000
Subject: cvs: smarty /libs Smarty.class.php Smarty_Compiler.class.php
Groups: php.smarty.cvs 
Request: Send a blank email to php-smarty-cvs+get-653@lists.php.net to get a copy of this message
mohrt Tue Jun 17 11:23:25 2003 EDT Modified files: /smarty/libs Smarty.class.php Smarty_Compiler.class.php Log: fix _run_mod_handler routine Index: smarty/libs/Smarty.class.php diff -u smarty/libs/Smarty.class.php:1.405 smarty/libs/Smarty.class.php:1.406 --- smarty/libs/Smarty.class.php:1.405 Tue Jun 17 10:11:56 2003 +++ smarty/libs/Smarty.class.php Tue Jun 17 11:23:25 2003 @@ -42,7 +42,7 @@ * @version 2.5.0 */ -/* $Id: Smarty.class.php,v 1.405 2003/06/17 14:11:56 mohrt Exp $ */ +/* $Id: Smarty.class.php,v 1.406 2003/06/17 15:23:25 mohrt Exp $ */ /** * DIR_SEP isn't used anymore, but third party apps might @@ -1521,22 +1521,24 @@ * @param array|null $map_array * @return string result of modifiers */ - function _run_mod_handler($_modifier_name, $_map_array, $_modifier_args) - { - $_func_name = $this->_plugins['modifier'][$_modifier_name][0]; - $_var = $_modifier_args[0]; + function _run_mod_handler() + { + $_args = func_get_args(); + list($_modifier_name, $_map_array) = array_splice($_args, 0, 2); + list($_func_name, $_tpl_file, $_tpl_line) = + $this->_plugins['modifier'][$_modifier_name]; + $_var = $_args[0]; if ($_map_array && is_array($_var)) { foreach ($_var as $_key => $_val) { - $_modifier_args[0] = $_val; - $_var[$_key] = call_user_func_array($_func_name, $_modifier_args); + $_args[0] = $_val; + $_var[$_key] = call_user_func_array($_func_name, $_args); } return $_var; } else { - return call_user_func_array($_func_name, $_modifier_args); + return call_user_func_array($_func_name, $_args); } } - /** * Remove starting and ending quotes from the string Index: smarty/libs/Smarty_Compiler.class.php diff -u smarty/libs/Smarty_Compiler.class.php:1.241 smarty/libs/Smarty_Compiler.class.php:1.242 --- smarty/libs/Smarty_Compiler.class.php:1.241 Tue Jun 17 10:11:57 2003 +++ smarty/libs/Smarty_Compiler.class.php Tue Jun 17 11:23:25 2003 @@ -39,7 +39,7 @@ * @package Smarty */ -/* $Id: Smarty_Compiler.class.php,v 1.241 2003/06/17 14:11:57 mohrt Exp $ */ +/* $Id: Smarty_Compiler.class.php,v 1.242 2003/06/17 15:23:25 mohrt Exp $ */ /** * Template compiling class * @package Smarty @@ -1688,7 +1688,6 @@ $output = "\$this->_run_mod_handler('$_modifier_name', $_map_array, $output$_modifier_args)"; } } - /** * add plugin

« previous php.smarty.cvs (#653) next »