mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 03:54:10 +01:00
[ticket/12687] Display the explain link only when DEBUG is set
PHPBB3-12687
This commit is contained in:
parent
39b76a628b
commit
1e769ba87f
@ -5074,7 +5074,9 @@ 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('DISPLAY_LOAD_TIME'))
|
||||
if ($auth->acl_get('a_'))
|
||||
{
|
||||
if (defined('DISPLAY_LOAD_TIME'))
|
||||
{
|
||||
if (function_exists('memory_get_peak_usage'))
|
||||
{
|
||||
@ -5085,10 +5087,14 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
|
||||
$debug_output .= ' | Peak Memory Usage: ' . $memory_usage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (defined('DEBUG'))
|
||||
{
|
||||
$debug_output .= ' | <a href="' . build_url() . '&explain=1">Explain</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'DEBUG_OUTPUT' => (defined('DISPLAY_LOAD_TIME')) ? $debug_output : '',
|
||||
|
@ -159,7 +159,9 @@ 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 (defined('DISPLAY_LOAD_TIME'))
|
||||
{
|
||||
if (function_exists('memory_get_peak_usage'))
|
||||
{
|
||||
@ -170,10 +172,14 @@ function adm_page_footer($copyright_html = true)
|
||||
$debug_output .= ' | Peak Memory Usage: ' . $memory_usage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (defined('DEBUG'))
|
||||
{
|
||||
$debug_output .= ' | <a href="' . build_url() . '&explain=1">Explain</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'DEBUG_OUTPUT' => (defined('DISPLAY_LOAD_TIME')) ? $debug_output : '',
|
||||
|
Loading…
x
Reference in New Issue
Block a user