From b4d4336ef4043a5b3381a9e70d3bbc6bc6732d07 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Mon, 18 Jun 2018 20:42:16 +0200 Subject: [ticket/12627] Add debug.sql_explain parameter PHPBB3-12627 --- phpBB/phpbb/db/driver/mssqlnative.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'phpBB/phpbb/db/driver/mssqlnative.php') diff --git a/phpBB/phpbb/db/driver/mssqlnative.php b/phpBB/phpbb/db/driver/mssqlnative.php index a4dcac5966..ff37eaf1c2 100644 --- a/phpBB/phpbb/db/driver/mssqlnative.php +++ b/phpBB/phpbb/db/driver/mssqlnative.php @@ -123,8 +123,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base { global $cache; - // EXPLAIN only in extra debug mode - if (defined('DEBUG')) + if ($this->debug_sql_explain) { $this->sql_report('start', $query); } @@ -146,7 +145,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base // reset options for next query $this->query_options = array(); - if (defined('DEBUG')) + if ($this->debug_sql_explain) { $this->sql_report('stop', $query); } @@ -170,7 +169,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base $this->open_queries[(int) $this->query_result] = $this->query_result; } } - else if (defined('DEBUG')) + else if ($this->debug_sql_explain) { $this->sql_report('fromcache', $query); } -- cgit v1.2.1 From 139eb17bb729763ab670fb239c77db02e29920f6 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Mon, 18 Jun 2018 20:35:01 +0200 Subject: [ticket/12624] Add debug.load_time parameter PHPBB3-12624 --- phpBB/phpbb/db/driver/mssqlnative.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/phpbb/db/driver/mssqlnative.php') diff --git a/phpBB/phpbb/db/driver/mssqlnative.php b/phpBB/phpbb/db/driver/mssqlnative.php index ff37eaf1c2..30ef9d9bc4 100644 --- a/phpBB/phpbb/db/driver/mssqlnative.php +++ b/phpBB/phpbb/db/driver/mssqlnative.php @@ -127,7 +127,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base { $this->sql_report('start', $query); } - else if (defined('PHPBB_DISPLAY_LOAD_TIME')) + else if ($this->debug_load_time) { $this->curtime = microtime(true); } @@ -149,7 +149,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base { $this->sql_report('stop', $query); } - else if (defined('PHPBB_DISPLAY_LOAD_TIME')) + else if ($this->debug_load_time) { $this->sql_time += microtime(true) - $this->curtime; } -- cgit v1.2.1