diff options
author | rvelices <rv-github@modusoptimus.com> | 2009-07-30 04:00:04 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2009-07-30 04:00:04 +0000 |
commit | de08354729ff5a3b8a547e35f9c8629f30d71432 (patch) | |
tree | 071e69c96a0a801ad3bf31f5110fbac28cbf8134 | |
parent | a8ab279cbe56aa0cc18fc424b3c0c4802dbab368 (diff) |
merge r3703 from trunk - fix smarty debugging info (not important)
git-svn-id: http://piwigo.org/svn/branches/2.0@3704 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/smarty/libs/Smarty.class.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/include/smarty/libs/Smarty.class.php b/include/smarty/libs/Smarty.class.php index e7298f2ec..2aaecbd93 100644 --- a/include/smarty/libs/Smarty.class.php +++ b/include/smarty/libs/Smarty.class.php @@ -20,7 +20,7 @@ * * For questions, help, comments, discussion, etc., please join the * Smarty mailing list. Send a blank e-mail to - * smarty-discussion-subscribe@googlegroups.com + * smarty-discussion-subscribe@googlegroups.com * * @link http://www.smarty.net/ * @copyright 2001-2005 New Digital Group, Inc. @@ -1058,7 +1058,7 @@ class Smarty } else { // var non-existant, return valid reference $_tmp = null; - return $_tmp; + return $_tmp; } } @@ -1117,7 +1117,7 @@ class Smarty function fetch($resource_name, $cache_id = null, $compile_id = null, $display = false) { static $_cache_info = array(); - + $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->error_reporting) ? $this->error_reporting : error_reporting() & ~E_NOTICE); @@ -1304,6 +1304,11 @@ class Smarty error_reporting($_smarty_old_error_level); return; } else { + if ($this->debugging) { + // capture time for debugging info + require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); + $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = (smarty_core_get_microtime(array(), $this) - $_debug_start_time); + } error_reporting($_smarty_old_error_level); if (isset($_smarty_results)) { return $_smarty_results; } } @@ -1933,10 +1938,10 @@ class Smarty { return eval($code); } - + /** * Extracts the filter name from the given callback - * + * * @param callback $function * @return string */ @@ -1951,7 +1956,7 @@ class Smarty return $function; } } - + /**#@-*/ } |