mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
fixed debug timing logic for config_load
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,3 +1,4 @@
|
||||
- fixed debug timing logic for config_load (Tom Sommer, Monte)
|
||||
- all in-code doc comments converted to phpDocumentor format (Greg)
|
||||
- moved strip from smarty core to plugin (Monte)
|
||||
- moved config_load from smarty core to plugin (Monte)
|
||||
|
@@ -24,6 +24,10 @@
|
||||
*/
|
||||
function smarty_function_config_load($params, &$smarty)
|
||||
{
|
||||
if ($smarty->debugging) {
|
||||
$_debug_start_time = $smarty->_get_microtime();
|
||||
}
|
||||
|
||||
$_file = isset($params['file']) ? $params['file'] : null;
|
||||
$_section = isset($params['section']) ? $params['section'] : null;
|
||||
$_scope = isset($params['scope']) ? $params['scope'] : 'global';
|
||||
@@ -96,10 +100,6 @@ function smarty_function_config_load($params, &$smarty)
|
||||
}
|
||||
}
|
||||
|
||||
if ($smarty->debugging) {
|
||||
$debug_start_time = $smarty->_get_microtime();
|
||||
}
|
||||
|
||||
if ($smarty->caching) {
|
||||
$smarty->_cache_info['config'][] = $_file;
|
||||
}
|
||||
@@ -118,11 +118,10 @@ function smarty_function_config_load($params, &$smarty)
|
||||
}
|
||||
|
||||
if ($smarty->debugging) {
|
||||
$debug_start_time = $smarty->_get_microtime();
|
||||
$smarty->_smarty_debug_info[] = array('type' => 'config',
|
||||
'filename' => $_file.' ['.$_section.'] '.$_scope,
|
||||
'depth' => $smarty->_inclusion_depth,
|
||||
'exec_time' => $smarty->_get_microtime() - $debug_start_time);
|
||||
'exec_time' => $smarty->_get_microtime() - $_debug_start_time);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user