diff --git a/NEWS b/NEWS index a0b33864..a8fe98d7 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - added $cacheable-parameter to register_compiler_function() (messju) - added $cacheable-parameter with default=true to register_function() and register_block() (messju) - add math speedup to core (Dominik, Monte) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 56435740..abc9c8b4 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -784,10 +784,10 @@ reques * @var string * @param string $function name of template function * @param string $function_impl name of PHP function to register */ - function register_compiler_function($function, $function_impl) + function register_compiler_function($function, $function_impl, $cacheable=true) { $this->_plugins['compiler'][$function] = - array($function_impl, null, null, false); + array($function_impl, null, null, false, $cacheable); } /**