diff --git a/resources/templates/console/display.twig b/resources/templates/console/display.twig index 1a64277253..7f3540d40c 100644 --- a/resources/templates/console/display.twig +++ b/resources/templates/console/display.twig @@ -19,9 +19,11 @@ {{ 'Bookmarks'|trans }} {% endif %} -
- {{ 'Debug SQL'|trans }} -
+ {% if debug %} +
+ {{ 'Debug SQL'|trans }} +
+ {% endif %} {# Console messages #} diff --git a/src/Console.php b/src/Console.php index d6b853f98c..8f735f5f33 100644 --- a/src/Console.php +++ b/src/Console.php @@ -111,11 +111,13 @@ class Console $bookmarkFeature = $this->relation->getRelationParameters()->bookmarkFeature; $sqlHistory = $this->relation->getHistory($this->config->selectedServer['user']); $bookmarkContent = $this->getBookmarkContent(); + $debug = isset($this->config->settings['DBG']) && $this->config->settings['DBG']['sql']; return $this->template->render('console/display', [ 'has_bookmark_feature' => $bookmarkFeature !== null, 'sql_history' => $sqlHistory, 'bookmark_content' => $bookmarkContent, + 'debug' => $debug, ]); } }