@@ -60,23 +60,23 @@ public function __invoke(ServerRequest $request): void
6060
6161 if ($ request ->hasBodyParam ('delete_tracking ' ) && $ request ->hasBodyParam ('table ' )) {
6262 $ this ->tracking ->deleteTracking ($ GLOBALS ['db ' ], $ request ->getParsedBodyParam ('table ' ));
63- echo Message::success (
63+ $ this -> response -> addHTML ( Message::success (
6464 __ ('Tracking data deleted successfully. ' ),
65- )->getDisplay ();
65+ )->getDisplay ()) ;
6666 } elseif ($ request ->hasBodyParam ('submit_create_version ' )) {
6767 $ this ->tracking ->createTrackingForMultipleTables (
6868 $ GLOBALS ['db ' ],
6969 $ request ->getParsedBodyParam ('selected ' ),
7070 $ request ->getParsedBodyParam ('version ' ),
7171 );
72- echo Message::success (
72+ $ this -> response -> addHTML ( Message::success (
7373 sprintf (
7474 __ (
7575 'Version %1$s was created for selected tables, tracking is active for them. ' ,
7676 ),
7777 htmlspecialchars ($ request ->getParsedBodyParam ('version ' )),
7878 ),
79- )->getDisplay ();
79+ )->getDisplay ()) ;
8080 } elseif ($ request ->hasBodyParam ('submit_mult ' )) {
8181 $ selectedTable = $ request ->getParsedBodyParam ('selected_tbl ' );
8282 if (! empty ($ selectedTable )) {
@@ -85,11 +85,11 @@ public function __invoke(ServerRequest $request): void
8585 $ this ->tracking ->deleteTracking ($ GLOBALS ['db ' ], $ table );
8686 }
8787
88- echo Message::success (
88+ $ this -> response -> addHTML ( Message::success (
8989 __ ('Tracking data deleted successfully. ' ),
90- )->getDisplay ();
90+ )->getDisplay ()) ;
9191 } elseif ($ request ->getParsedBodyParam ('submit_mult ' ) === 'track ' ) {
92- echo $ this -> template ->render ('create_tracking_version ' , [
92+ $ this ->render ('create_tracking_version ' , [
9393 'route ' => '/database/tracking ' ,
9494 'url_params ' => $ GLOBALS ['urlParams ' ],
9595 'last_version ' => 0 ,
@@ -102,9 +102,9 @@ public function __invoke(ServerRequest $request): void
102102 return ;
103103 }
104104 } else {
105- echo Message::notice (
105+ $ this -> response -> addHTML ( Message::notice (
106106 __ ('No tables selected. ' ),
107- )->getDisplay ();
107+ )->getDisplay ()) ;
108108 }
109109 }
110110
@@ -113,19 +113,21 @@ public function __invoke(ServerRequest $request): void
113113
114114 // No tables present and no log exist
115115 if ($ numTables === 0 && $ trackedData ->ddlog === []) {
116- echo '<p> ' , __ ('No tables found in database. ' ) , '</p> ' , "\n" ;
116+ $ this -> response -> addHTML ( '<p> ' . __ ('No tables found in database. ' ) . '</p> ' . "\n" ) ;
117117
118118 if (! $ isSystemSchema ) {
119119 $ checkUserPrivileges = new CheckUserPrivileges ($ this ->dbi );
120120 $ checkUserPrivileges ->getPrivileges ();
121121
122- echo $ this -> template ->render ('database/create_table ' , ['db ' => $ GLOBALS ['db ' ]]);
122+ $ this ->render ('database/create_table ' , ['db ' => $ GLOBALS ['db ' ]]);
123123 }
124124
125125 return ;
126126 }
127127
128- echo $ this ->tracking ->getHtmlForDbTrackingTables ($ GLOBALS ['db ' ], $ GLOBALS ['urlParams ' ], $ GLOBALS ['text_dir ' ]);
128+ $ this ->response ->addHTML (
129+ $ this ->tracking ->getHtmlForDbTrackingTables ($ GLOBALS ['db ' ], $ GLOBALS ['urlParams ' ], $ GLOBALS ['text_dir ' ]),
130+ );
129131
130132 // If available print out database log
131133 if ($ trackedData ->ddlog === []) {
@@ -138,6 +140,6 @@ public function __invoke(ServerRequest $request): void
138140 . $ entry ['statement ' ] . "\n" ;
139141 }
140142
141- echo Generator::getMessage (__ ('Database Log ' ), $ log );
143+ $ this -> response -> addHTML ( Generator::getMessage (__ ('Database Log ' ), $ log) );
142144 }
143145}
0 commit comments