From 39b76a628b0c485b2ec96bbd2ea1bfea91ca4da3 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Tue, 10 Jun 2014 16:13:09 +0200 Subject: [PATCH] [ticket/12687] Add a constant to display the load time without DEBUG PHPBB3-12687 --- phpBB/includes/functions.php | 6 +++--- phpBB/includes/functions_acp.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index be032440b9..f8c40b1638 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5062,7 +5062,7 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler = } // Output page creation time - if (defined('DEBUG')) + if (defined('DISPLAY_LOAD_TIME')) { $mtime = explode(' ', microtime()); $totaltime = $mtime[0] + $mtime[1] - $starttime; @@ -5074,7 +5074,7 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler = $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress'] && @extension_loaded('zlib')) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime); - if ($auth->acl_get('a_') && defined('DEBUG')) + if ($auth->acl_get('a_') && defined('DISPLAY_LOAD_TIME')) { if (function_exists('memory_get_peak_usage')) { @@ -5091,7 +5091,7 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler = } $template->assign_vars(array( - 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '', + 'DEBUG_OUTPUT' => (defined('DISPLAY_LOAD_TIME')) ? $debug_output : '', 'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '', 'CREDIT_LINE' => $user->lang('POWERED_BY', 'phpBB® Forum Software © phpBB Limited'), diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php index 373eb57934..4d0a20ce1f 100644 --- a/phpBB/includes/functions_acp.php +++ b/phpBB/includes/functions_acp.php @@ -147,7 +147,7 @@ function adm_page_footer($copyright_html = true) } // Output page creation time - if (defined('DEBUG')) + if (defined('DISPLAY_LOAD_TIME')) { $mtime = explode(' ', microtime()); $totaltime = $mtime[0] + $mtime[1] - $starttime; @@ -159,7 +159,7 @@ function adm_page_footer($copyright_html = true) $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress']) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime); - if ($auth->acl_get('a_') && defined('DEBUG')) + if ($auth->acl_get('a_') && defined('DISPLAY_LOAD_TIME')) { if (function_exists('memory_get_peak_usage')) { @@ -176,7 +176,7 @@ function adm_page_footer($copyright_html = true) } $template->assign_vars(array( - 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '', + 'DEBUG_OUTPUT' => (defined('DISPLAY_LOAD_TIME')) ? $debug_output : '', 'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '', 'S_COPYRIGHT_HTML' => $copyright_html, 'CREDIT_LINE' => $user->lang('POWERED_BY', 'phpBB® Forum Software © phpBB Limited'),