Merge #18516 - Fix #18392 - Format query not working inside view modal

Fixes: #18392
Pull-request: #18516

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2023-06-29 12:50:08 +02:00
commit 7d10e2f87d
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -995,6 +995,9 @@ class Sql
$response = ResponseRenderer::getInstance();
$response->addJSON($extraData ?? []);
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('sql.js');
if (! $statementInfo->isSelect || isset($extraData['error'])) {
return $queryMessage;
@ -1024,10 +1027,6 @@ class Sql
$profilingChart = '';
if ($profilingResults !== []) {
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('sql.js');
$profiling = $this->getDetailedProfilingStats($profilingResults);
if ($profiling !== []) {
$profilingChart = $this->template->render('sql/profiling_chart', ['profiling' => $profiling]);