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

Merge pull request #5267 from senky/ticket/12627

[ticket/12627] Add debug.sql_explain parameter

* github.com:/phpbb/phpbb:
  [ticket/12627] Add debug.sql_explain parameter
This commit is contained in:
Tristan Darricau
2018-07-08 18:26:52 +02:00
14 changed files with 57 additions and 30 deletions

View File

@@ -4558,6 +4558,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
@@ -4589,7 +4591,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>';
}