@@ -55,7 +55,7 @@ public function __invoke(ServerRequest $request): void
5555
5656 $ this ->checkUserPrivileges ->getPrivileges ();
5757
58- if (! $ this -> response ->isAjax ()) {
58+ if (! $ request ->isAjax ()) {
5959 /**
6060 * Displays the header and tabs
6161 */
@@ -92,7 +92,7 @@ public function __invoke(ServerRequest $request): void
9292
9393 if (! empty ($ _POST ['editor_process_add ' ]) || ! empty ($ _POST ['editor_process_edit ' ])) {
9494 $ output = $ this ->routines ->handleRequestCreateOrEdit ($ GLOBALS ['db ' ]);
95- if ($ this -> response ->isAjax ()) {
95+ if ($ request ->isAjax ()) {
9696 if (! $ GLOBALS ['message ' ]->isSuccess ()) {
9797 $ this ->response ->setRequestStatus (false );
9898 $ this ->response ->addJSON ('message ' , $ output );
@@ -227,15 +227,15 @@ public function __invoke(ServerRequest $request): void
227227 'db ' => $ GLOBALS ['db ' ],
228228 'routine ' => $ routine ,
229229 'is_edit_mode ' => $ mode === 'edit ' ,
230- 'is_ajax ' => $ this -> response ->isAjax (),
230+ 'is_ajax ' => $ request ->isAjax (),
231231 'parameter_rows ' => $ parameterRows ,
232232 'charsets ' => $ charsets ,
233233 'numeric_options ' => $ this ->routines ->numericOptions ,
234234 'has_privileges ' => $ GLOBALS ['proc_priv ' ] && $ GLOBALS ['is_reload_priv ' ],
235235 'sql_data_access ' => $ this ->routines ->sqlDataAccess ,
236236 ]);
237237
238- if ($ this -> response ->isAjax ()) {
238+ if ($ request ->isAjax ()) {
239239 $ this ->response ->addJSON ('message ' , $ editor );
240240 $ this ->response ->addJSON ('title ' , $ title );
241241 $ this ->response ->addJSON (
@@ -265,7 +265,7 @@ public function __invoke(ServerRequest $request): void
265265 );
266266
267267 $ message = Message::error ($ message );
268- if ($ this -> response ->isAjax ()) {
268+ if ($ request ->isAjax ()) {
269269 $ this ->response ->setRequestStatus (false );
270270 $ this ->response ->addJSON ('message ' , $ message );
271271
@@ -289,7 +289,7 @@ public function __invoke(ServerRequest $request): void
289289 htmlspecialchars (Util::backquote ($ GLOBALS ['db ' ])),
290290 );
291291 $ message = Message::error ($ message );
292- if ($ this -> response ->isAjax ()) {
292+ if ($ request ->isAjax ()) {
293293 $ this ->response ->setRequestStatus (false );
294294 $ this ->response ->addJSON ('message ' , $ message );
295295
@@ -304,7 +304,7 @@ public function __invoke(ServerRequest $request): void
304304 [$ output , $ message ] = $ this ->routines ->handleExecuteRoutine ($ routine );
305305
306306 // Print/send output
307- if ($ this -> response ->isAjax ()) {
307+ if ($ request ->isAjax ()) {
308308 $ this ->response ->setRequestStatus ($ message ->isSuccess ());
309309 $ this ->response ->addJSON ('message ' , $ message ->getDisplay () . $ output );
310310 $ this ->response ->addJSON ('dialog ' , false );
@@ -328,11 +328,11 @@ public function __invoke(ServerRequest $request): void
328328 $ form = $ this ->template ->render ('database/routines/execute_form ' , [
329329 'db ' => $ GLOBALS ['db ' ],
330330 'routine ' => $ routine ,
331- 'ajax ' => $ this -> response ->isAjax (),
331+ 'ajax ' => $ request ->isAjax (),
332332 'show_function_fields ' => $ GLOBALS ['cfg ' ]['ShowFunctionFields ' ],
333333 'params ' => $ params ,
334334 ]);
335- if ($ this -> response ->isAjax ()) {
335+ if ($ request ->isAjax ()) {
336336 $ title = __ ('Execute routine ' ) . ' ' . Util::backquote (
337337 htmlentities ($ _GET ['item_name ' ], ENT_QUOTES ),
338338 );
@@ -349,7 +349,7 @@ public function __invoke(ServerRequest $request): void
349349 return ;
350350 }
351351
352- if ($ this -> response ->isAjax ()) {
352+ if ($ request ->isAjax ()) {
353353 $ message = __ ('Error in processing request: ' ) . ' ' ;
354354 $ message .= sprintf (
355355 __ ('No routine with name %1$s found in database %2$s. ' ),
@@ -389,7 +389,7 @@ public function __invoke(ServerRequest $request): void
389389 $ exportData = htmlspecialchars (trim ($ exportData ));
390390 $ title = sprintf (__ ('Export of routine %s ' ), $ itemName );
391391
392- if ($ this -> response ->isAjax ()) {
392+ if ($ request ->isAjax ()) {
393393 $ this ->response ->addJSON ('message ' , $ exportData );
394394 $ this ->response ->addJSON ('title ' , $ title );
395395
@@ -414,7 +414,7 @@ public function __invoke(ServerRequest $request): void
414414 );
415415 $ message = Message::error ($ message );
416416
417- if ($ this -> response ->isAjax ()) {
417+ if ($ request ->isAjax ()) {
418418 $ this ->response ->setRequestStatus (false );
419419 $ this ->response ->addJSON ('message ' , $ message );
420420
@@ -430,7 +430,7 @@ public function __invoke(ServerRequest $request): void
430430 }
431431
432432 $ items = Routines::getDetails ($ this ->dbi , $ GLOBALS ['db ' ], $ type );
433- $ isAjax = $ this -> response ->isAjax () && empty ($ _REQUEST ['ajax_page_request ' ]);
433+ $ isAjax = $ request ->isAjax () && empty ($ _REQUEST ['ajax_page_request ' ]);
434434
435435 $ rows = '' ;
436436 foreach ($ items as $ item ) {
0 commit comments