Merge pull request #18723 from SachinBahukhandi/console-fix-debug-cfg
If $cfg['DBG']['sql'] doesn't exist or is set to false, Debug SQL tab should be hidden Fixes #18716
This commit is contained in:
commit
09dc7a5686
@ -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 #}
|
||||
|
||||
@ -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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user