mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 02:14:26 +02:00
Passing Smarty as second parameter to prefilter functions.
This commit is contained in:
2
NEWS
2
NEWS
@@ -1,3 +1,5 @@
|
||||
- modified Smarty to pass itself to prefilter functions as the second
|
||||
parameter. (Andrei)
|
||||
- fixed syntax error when including a non-existant template with security
|
||||
enabled. (Monte)
|
||||
- fixed comments handling to allow commenting out template blocks. (Andrei)
|
||||
|
@@ -67,7 +67,7 @@ class Smarty_Compiler extends Smarty {
|
||||
if (is_array($this->prefilter_funcs) && count($this->prefilter_funcs) > 0) {
|
||||
foreach ($this->prefilter_funcs as $prefilter) {
|
||||
if (function_exists($prefilter)) {
|
||||
$template_source = $prefilter($template_source);
|
||||
$template_source = $prefilter($template_source, $this);
|
||||
} else {
|
||||
$this->_trigger_error_msg("prefilter function $prefilter does not exist.");
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ class Smarty_Compiler extends Smarty {
|
||||
if (is_array($this->prefilter_funcs) && count($this->prefilter_funcs) > 0) {
|
||||
foreach ($this->prefilter_funcs as $prefilter) {
|
||||
if (function_exists($prefilter)) {
|
||||
$template_source = $prefilter($template_source);
|
||||
$template_source = $prefilter($template_source, $this);
|
||||
} else {
|
||||
$this->_trigger_error_msg("prefilter function $prefilter does not exist.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user