aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/page_tail.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/page_tail.php')
-rw-r--r--phpBB/includes/page_tail.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/phpBB/includes/page_tail.php b/phpBB/includes/page_tail.php
index 58706a2cc6..5296f41a9c 100644
--- a/phpBB/includes/page_tail.php
+++ b/phpBB/includes/page_tail.php
@@ -32,7 +32,7 @@ if (defined('DEBUG'))
$mtime = explode(' ', microtime());
$totaltime = $mtime[0] + $mtime[1] - $starttime;
- if (!empty($_REQUEST['explain']))
+ if (!empty($_REQUEST['explain']) && $auth->acl_get('a_'))
{
echo $db->sql_report;
echo "<pre><b>Page generated in $totaltime seconds with " . $db->num_queries . " queries,\nspending " . $db->sql_time . ' doing MySQL queries and ' . ($totaltime - $db->sql_time) . ' doing PHP things.</b></pre>';
@@ -40,14 +40,19 @@ if (defined('DEBUG'))
exit;
}
- $debug_output = sprintf('<br /><br />[ Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . ( ( $board_config['gzip_compress'] ) ? 'On' : 'Off' ) . ' | Load : ' . ( ( $session->load ) ? $session->load : 'N/A') . ' | <a href="' . $_SERVER['REQUEST_URI'] . '&amp;explain=1">Explain</a> ]', $totaltime);
+ $debug_output = sprintf('<br /><br />[ Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . ( ( $board_config['gzip_compress'] ) ? 'On' : 'Off' ) . ' | Load : ' . (($session->load) ? $session->load : 'N/A'), $totaltime);
+
+ if ($auth->acl_get('a_'))
+ {
+ $debug_output .= ' | <a href="' . $_SERVER['REQUEST_URI'] . '&amp;explain=1">Explain</a> ]';
+ }
}
$template->assign_vars(array(
'PHPBB_VERSION' => $board_config['version'],
'ADMIN_LINK' => ( $auth->acl_get('a_') ) ? '<a href="' . "admin/index.$phpEx$SID" . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '',
- 'DEBUG_OUTPUT' => ( defined('DEBUG') ) ? $debug_output : '')
-);
+ 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : ''
+));
$template->display('body');