mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
fixed bug with passing $smarty as reference in Smarty.compiler.class
quoted "<?php ... ?>" in comment to dis-annoy syntax-highlighting of a certain editor
This commit is contained in:
1
NEWS
1
NEWS
@@ -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,
|
||||
|
@@ -186,7 +186,7 @@ class Smarty
|
||||
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>
|
||||
|
@@ -229,7 +229,8 @@ class Smarty_Compiler extends Smarty {
|
||||
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 @@ class Smarty_Compiler extends Smarty {
|
||||
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 @@ class Smarty_Compiler extends Smarty {
|
||||
*/
|
||||
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__);
|
||||
}
|
||||
|
Reference in New Issue
Block a user