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

From: Date: Fri, 18 Apr 2003 10:03:10 +0000
Subject: cvs: smarty / NEWS /libs Smarty.class.php Smarty_Compiler.class.php
Groups: php.smarty.cvs 
Request: Send a blank email to php-smarty-cvs+get-532@lists.php.net to get a copy of this message
messju Fri Apr 18 06:03:10 2003 EDT Modified files: /smarty NEWS /smarty/libs Smarty.class.php Smarty_Compiler.class.php Log: fixed bug with passing $smarty as reference in Smarty.compiler.class quoted "<?php ... ?>" in comment to dis-annoy syntax-highlighting of a certain editor Index: smarty/NEWS diff -u smarty/NEWS:1.341 smarty/NEWS:1.342 --- smarty/NEWS:1.341 Thu Apr 17 14:30:41 2003 +++ smarty/NEWS Fri Apr 18 06:03:09 2003 @@ -1,3 +1,4 @@ + - fixed bug with passing $smarty as reference in Smarty.compiler.class (messju) - corrected output with {strip} and PHP tag newlines (Monte) - added possibility to register function-callbacks as "array(&$obj, 'method)" this affects register_function(), -block, -compiler_function, -modifier, Index: smarty/libs/Smarty.class.php diff -u smarty/libs/Smarty.class.php:1.377 smarty/libs/Smarty.class.php:1.378 --- smarty/libs/Smarty.class.php:1.377 Tue Apr 15 06:41:12 2003 +++ smarty/libs/Smarty.class.php Fri Apr 18 06:03:09 2003 @@ -42,7 +42,7 @@ * @version 2.5.0 */ -/* $Id: Smarty.class.php,v 1.377 2003/04/15 10:41:12 messju Exp $ */ +/* $Id: Smarty.class.php,v 1.378 2003/04/18 10:03:09 messju Exp $ */ /** * set SMARTY_DIR to absolute path to Smarty library files. @@ -186,7 +186,7 @@ var $cache_modified_check = false; /** - * This determines how Smarty handles <?php ?> tags in templates. + * This determines how Smarty handles "<?php ... ?>" tags in templates. * possible values: * <ul> * <li>SMARTY_PHP_PASSTHRU -> print tags as plain text</li> @@ -1330,7 +1330,7 @@ touch($_compile_file,filemtime($_file_path)); } } - + if ($this->debugging) { $debug_start_time = $this->_get_microtime(); } Index: smarty/libs/Smarty_Compiler.class.php diff -u smarty/libs/Smarty_Compiler.class.php:1.210 smarty/libs/Smarty_Compiler.class.php:1.211 --- smarty/libs/Smarty_Compiler.class.php:1.210 Thu Apr 17 14:30:41 2003 +++ smarty/libs/Smarty_Compiler.class.php Fri Apr 18 06:03:09 2003 @@ -39,7 +39,7 @@ * @package Smarty */ -/* $Id: Smarty_Compiler.class.php,v 1.210 2003/04/17 18:30:41 mohrt Exp $ */ +/* $Id: Smarty_Compiler.class.php,v 1.211 2003/04/18 10:03:09 messju Exp $ */ class Smarty_Compiler extends Smarty { @@ -229,7 +229,8 @@ foreach ($this->_plugins['prefilter'] as $filter_name => $prefilter) { if ($prefilter === false) continue; if ($prefilter[3] || $this->_plugin_implementation_exists($prefilter[0])) { - $template_source = call_user_func($prefilter[0], $template_source, $this); + $template_source = call_user_func_array($prefilter[0], + array($template_source, &$this)); $this->_plugins['prefilter'][$filter_name][3] = true; } else { $this->_trigger_fatal_error("[plugin] prefilter '$filter_name' is not implemented"); @@ -336,7 +337,8 @@ foreach ($this->_plugins['postfilter'] as $filter_name => $postfilter) { if ($postfilter === false) continue; if ($postfilter[3] || $this->_plugin_implementation_exists($postfilter[0])) { - $template_compiled = call_user_func($postfilter[0], $template_compiled, $this); + $template_compiled = call_user_func_array($postfilter[0], + array($template_compiled, &$this)); $this->_plugins['postfilter'][$filter_name][3] = true; } else { $this->_trigger_fatal_error("Smarty plugin error: postfilter '$filter_name' is not implemented"); @@ -559,7 +561,8 @@ */ if ($found) { if ($have_function) { - $output = '<?php ' . call_user_func($plugin_func, $tag_args, $this) . ' ?>'; + $output = '<?php ' . call_user_func_array($plugin_func, + array($tag_args, &$this)) . ' ?>'; } else { $this->_syntax_error($message, E_USER_WARNING, __FILE__, __LINE__); }

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