@@ -293,29 +293,27 @@ private function ajaxResponse(): string
293293 $ promptPhpErrors = $ this ->errorHandler ->hasErrorsForPrompt ();
294294 $ this ->addJSON ('promptPhpErrors ' , $ promptPhpErrors );
295295
296- if (empty ($ GLOBALS ['error_message ' ])) {
297- // set current db, table and sql query in the querywindow
298- // (this is for the bottom console)
299- $ query = '' ;
300- $ maxChars = $ this ->config ->settings ['MaxCharactersInDisplayedSQL ' ];
301- if (isset ($ GLOBALS ['sql_query ' ]) && mb_strlen ($ GLOBALS ['sql_query ' ]) < $ maxChars ) {
302- $ query = $ GLOBALS ['sql_query ' ];
303- }
304-
305- $ this ->addJSON (
306- 'reloadQuerywindow ' ,
307- ['db ' => Current::$ database , 'table ' => Current::$ table , 'sql_query ' => $ query ],
308- );
309- if (! empty ($ GLOBALS ['focus_querywindow ' ])) {
310- $ this ->addJSON ('_focusQuerywindow ' , $ query );
311- }
312-
313- if (! empty ($ GLOBALS ['reload ' ])) {
314- $ this ->addJSON ('reloadNavigation ' , 1 );
315- }
316-
317- $ this ->addJSON ('params ' , $ this ->getHeader ()->getJsParams ());
296+ // set current db, table and sql query in the querywindow
297+ // (this is for the bottom console)
298+ $ query = '' ;
299+ $ maxChars = $ this ->config ->settings ['MaxCharactersInDisplayedSQL ' ];
300+ if (isset ($ GLOBALS ['sql_query ' ]) && mb_strlen ($ GLOBALS ['sql_query ' ]) < $ maxChars ) {
301+ $ query = $ GLOBALS ['sql_query ' ];
318302 }
303+
304+ $ this ->addJSON (
305+ 'reloadQuerywindow ' ,
306+ ['db ' => Current::$ database , 'table ' => Current::$ table , 'sql_query ' => $ query ],
307+ );
308+ if (! empty ($ GLOBALS ['focus_querywindow ' ])) {
309+ $ this ->addJSON ('_focusQuerywindow ' , $ query );
310+ }
311+
312+ if (! empty ($ GLOBALS ['reload ' ])) {
313+ $ this ->addJSON ('reloadNavigation ' , 1 );
314+ }
315+
316+ $ this ->addJSON ('params ' , $ this ->getHeader ()->getJsParams ());
319317 }
320318
321319 $ result = json_encode ($ this ->JSON );
0 commit comments