[ticket/16314] Deprecate phpbb_check_and_display_sql_report

PHPBB3-16314
This commit is contained in:
Marc Alexander 2020-02-02 13:48:46 +01:00
parent 8bdad7d73e
commit e6624c1fd5
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
2 changed files with 7 additions and 5 deletions

View file

@ -4315,15 +4315,17 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
* @param \phpbb\request\request_interface $request Request object * @param \phpbb\request\request_interface $request Request object
* @param \phpbb\auth\auth $auth Auth object * @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\db\driver\driver_interface $db Database connection * @param \phpbb\db\driver\driver_interface $db Database connection
*
* @deprecated 3.3.1 (To be removed: 4.0.0-a1); use controller helper's display_sql_report()
*/ */
function phpbb_check_and_display_sql_report(\phpbb\request\request_interface $request, \phpbb\auth\auth $auth, \phpbb\db\driver\driver_interface $db) function phpbb_check_and_display_sql_report(\phpbb\request\request_interface $request, \phpbb\auth\auth $auth, \phpbb\db\driver\driver_interface $db)
{ {
global $phpbb_container; global $phpbb_container;
if ($phpbb_container->getParameter('debug.sql_explain') && $request->variable('explain', false) && $auth->acl_get('a_')) /** @var \phpbb\controller\helper $controller_helper */
{ $controller_helper = $phpbb_container->get('controller.helper');
$db->sql_report('display');
} $controller_helper->display_sql_report();
} }
/** /**

View file

@ -274,7 +274,7 @@ class helper
* *
* @return void * @return void
*/ */
protected function display_sql_report() public function display_sql_report()
{ {
if ($this->sql_explain && $this->request->variable('explain', false) && $this->auth->acl_get('a_')) if ($this->sql_explain && $this->request->variable('explain', false) && $this->auth->acl_get('a_'))
{ {