1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/12627] Add debug.sql_explain parameter

PHPBB3-12627
This commit is contained in:
Jakub Senko
2018-06-18 20:42:16 +02:00
parent 1d0046437b
commit bdff0f5590
14 changed files with 57 additions and 30 deletions

View File

@@ -4532,6 +4532,8 @@ function phpbb_check_and_display_sql_report(\phpbb\request\request_interface $re
*/
function phpbb_generate_debug_output(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\auth\auth $auth, \phpbb\user $user, \phpbb\event\dispatcher_interface $phpbb_dispatcher)
{
global $phpbb_container;
$debug_info = array();
// Output page creation time
@@ -4563,7 +4565,7 @@ function phpbb_generate_debug_output(\phpbb\db\driver\driver_interface $db, \php
$debug_info[] = 'Load: ' . $user->load;
}
if ($auth->acl_get('a_'))
if ($auth->acl_get('a_') && $phpbb_container->getParameter('debug.sql_explain'))
{
$debug_info[] = '<a href="' . build_url() . '&amp;explain=1">SQL Explain</a>';
}