From 5a803ca612c6d71f57310d3babd893d4412ad7d7 Mon Sep 17 00:00:00 2001 From: messju Date: Thu, 19 Jun 2003 10:35:23 +0000 Subject: [PATCH] added $cacheable-parameter to register_compiler_function() --- NEWS | 1 + libs/Smarty.class.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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); } /**