From 1e769ba87f3b2d510ad82e11e971fc2abcf8a8d0 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Tue, 10 Jun 2014 17:52:41 +0200 Subject: [ticket/12687] Display the explain link only when DEBUG is set PHPBB3-12687 --- phpBB/includes/functions_acp.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'phpBB/includes/functions_acp.php') diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php index 4d0a20ce1f..357832794d 100644 --- a/phpBB/includes/functions_acp.php +++ b/phpBB/includes/functions_acp.php @@ -159,19 +159,25 @@ 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('DISPLAY_LOAD_TIME')) + if ($auth->acl_get('a_')) { - if (function_exists('memory_get_peak_usage')) + if (defined('DISPLAY_LOAD_TIME')) { - if ($memory_usage = memory_get_peak_usage()) + if (function_exists('memory_get_peak_usage')) { - $memory_usage = get_formatted_filesize($memory_usage); + if ($memory_usage = memory_get_peak_usage()) + { + $memory_usage = get_formatted_filesize($memory_usage); - $debug_output .= ' | Peak Memory Usage: ' . $memory_usage; + $debug_output .= ' | Peak Memory Usage: ' . $memory_usage; + } } } - $debug_output .= ' | Explain'; + if (defined('DEBUG')) + { + $debug_output .= ' | Explain'; + } } } -- cgit v1.2.1