update default function args, fix cached insert debug timing

This commit is contained in:
mohrt
2001-12-13 21:09:33 +00:00
parent ba92f456b1
commit cf0ee547f1
4 changed files with 11 additions and 10 deletions

1
NEWS
View File

@@ -1,3 +1,4 @@
- fixed bug with cached insert debug timing (Monte)
- added 'script' attribute to {insert..} which specifies the script that
the insert function can be found in. (Andrei)
- added default template function handler. (Monte)

View File

@@ -935,7 +935,7 @@ function _is_trusted($resource_type, $resource_name)
$_return = false;
}
$funcname = $this->default_template_handler_func;
$_return = $funcname($tpl_path, $template_source, $template_timestamp, $this);
$_return = $funcname($resource_type, $resource_name, $template_source, $template_timestamp, $this);
}
}
@@ -1100,15 +1100,15 @@ function _is_trusted($resource_type, $resource_name)
\*======================================================================*/
function _process_cached_inserts($results)
{
if ($this->debugging) {
$debug_start_time = $this->_get_microtime();
}
preg_match_all('!'.$this->_smarty_md5.'{insert_cache (.*)}'.$this->_smarty_md5.'!Uis',
$results, $match);
list($cached_inserts, $insert_args) = $match;
for ($i = 0; $i < count($cached_inserts); $i++) {
if ($this->debugging) {
$debug_start_time = $this->_get_microtime();
}
$args = unserialize($insert_args[$i]);

View File

@@ -1602,7 +1602,7 @@ $smarty->display("index.tpl");
argument is the action, which will be one of 'read', 'write' and
'clear'. The second parameter is the smarty object. The third
parameter is the cached content. Upon a write, Smarty passed th
cached content in this paramters. Upon a 'read', Smarty expects
cached content in this parameters. Upon a 'read', Smarty expects
your function to pass this by reference and populate it with the
cached data. Upon a 'clear', pass a dummy variable here since it is
not used. The fourth parameter is the name of the template file
@@ -4456,7 +4456,7 @@ OUTPUT:
6
{* you can supply a format paramter in sprintf format *}
{* you can supply a format parameter in sprintf format *}
{math equation="x + y" x=4.4444 y=5.0000 format="%.2f"}

View File

@@ -935,7 +935,7 @@ function _is_trusted($resource_type, $resource_name)
$_return = false;
}
$funcname = $this->default_template_handler_func;
$_return = $funcname($tpl_path, $template_source, $template_timestamp, $this);
$_return = $funcname($resource_type, $resource_name, $template_source, $template_timestamp, $this);
}
}
@@ -1100,15 +1100,15 @@ function _is_trusted($resource_type, $resource_name)
\*======================================================================*/
function _process_cached_inserts($results)
{
if ($this->debugging) {
$debug_start_time = $this->_get_microtime();
}
preg_match_all('!'.$this->_smarty_md5.'{insert_cache (.*)}'.$this->_smarty_md5.'!Uis',
$results, $match);
list($cached_inserts, $insert_args) = $match;
for ($i = 0; $i < count($cached_inserts); $i++) {
if ($this->debugging) {
$debug_start_time = $this->_get_microtime();
}
$args = unserialize($insert_args[$i]);