Skip to content

Commit 7d10e2f

Browse files
committed
Merge #18516 - Fix #18392 - Format query not working inside view modal
Fixes: #18392 Pull-request: #18516 Signed-off-by: William Desportes <williamdes@wdes.fr>
2 parents 74b7253 + 2a66496 commit 7d10e2f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

libraries/classes/Sql.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,9 @@ private function getQueryResponseForNoResultsReturned(
995995

996996
$response = ResponseRenderer::getInstance();
997997
$response->addJSON($extraData ?? []);
998+
$header = $response->getHeader();
999+
$scripts = $header->getScripts();
1000+
$scripts->addFile('sql.js');
9981001

9991002
if (! $statementInfo->isSelect || isset($extraData['error'])) {
10001003
return $queryMessage;
@@ -1024,10 +1027,6 @@ private function getQueryResponseForNoResultsReturned(
10241027

10251028
$profilingChart = '';
10261029
if ($profilingResults !== []) {
1027-
$header = $response->getHeader();
1028-
$scripts = $header->getScripts();
1029-
$scripts->addFile('sql.js');
1030-
10311030
$profiling = $this->getDetailedProfilingStats($profilingResults);
10321031
if ($profiling !== []) {
10331032
$profilingChart = $this->template->render('sql/profiling_chart', ['profiling' => $profiling]);

0 commit comments

Comments
 (0)