mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/16314] Deprecate phpbb_check_and_display_sql_report
PHPBB3-16314
This commit is contained in:
parent
8bdad7d73e
commit
e6624c1fd5
2 changed files with 7 additions and 5 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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_'))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue