Added fix for hiding debug SQL on debug false

Signed-off-by: Sachin Bahukhandi <sachinb0013@gmail.com>
This commit is contained in:
Sachin Bahukhandi 2023-09-20 23:47:41 +05:30 committed by Maurício Meneghini Fauth
parent 6188e468ee
commit 4d86d23885
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
2 changed files with 7 additions and 3 deletions

View File

@ -19,9 +19,11 @@
<span>{{ 'Bookmarks'|trans }}</span>
</div>
{% endif %}
<div class="button debug hide">
<span>{{ 'Debug SQL'|trans }}</span>
</div>
{% if debug %}
<div class="button debug hide">
<span>{{ 'Debug SQL'|trans }}</span>
</div>
{% endif %}
</div>
{# Console messages #}

View File

@ -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,
]);
}
}