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/postgres.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'phpBB/phpbb/db/driver/postgres.php') diff --git a/phpBB/phpbb/db/driver/postgres.php b/phpBB/phpbb/db/driver/postgres.php index 44476612c3..2052268921 100644 --- a/phpBB/phpbb/db/driver/postgres.php +++ b/phpBB/phpbb/db/driver/postgres.php @@ -173,8 +173,7 @@ class postgres extends \phpbb\db\driver\driver { global $cache; - // EXPLAIN only in extra debug mode - if (defined('DEBUG')) + if ($this->debug_sql_explain) { $this->sql_report('start', $query); } @@ -194,7 +193,7 @@ class postgres extends \phpbb\db\driver\driver $this->sql_error($query); } - if (defined('DEBUG')) + if ($this->debug_sql_explain) { $this->sql_report('stop', $query); } @@ -218,7 +217,7 @@ class postgres extends \phpbb\db\driver\driver $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