@@ -76,29 +76,29 @@ public function __invoke(ServerRequest $request): void
7676 return ;
7777 }
7878
79- if (! empty ( $ _POST [ 'selected_tbl ' ] ) && empty ($ GLOBALS ['table_select ' ])) {
80- $ GLOBALS ['table_select ' ] = $ _POST [ 'selected_tbl ' ] ;
79+ if ($ request -> hasBodyParam ( 'selected_tbl ' ) && empty ($ GLOBALS ['table_select ' ])) {
80+ $ GLOBALS ['table_select ' ] = $ request -> getParsedBodyParam ( 'selected_tbl ' ) ;
8181 }
8282
8383 $ tablesForMultiValues = [];
8484
8585 foreach ($ GLOBALS ['tables ' ] as $ each_table ) {
86- if (isset ( $ _POST [ ' table_select ' ]) && is_array ($ _POST [ 'table_select ' ] )) {
87- $ is_checked = $ this ->export ->getCheckedClause ($ each_table ['Name ' ], $ _POST [ 'table_select ' ] );
86+ if (is_array ($ request -> getParsedBodyParam ( 'table_select ' ) )) {
87+ $ is_checked = $ this ->export ->getCheckedClause ($ each_table ['Name ' ], $ request -> getParsedBodyParam ( 'table_select ' ) );
8888 } elseif (isset ($ GLOBALS ['table_select ' ])) {
8989 $ is_checked = $ this ->export ->getCheckedClause ($ each_table ['Name ' ], $ GLOBALS ['table_select ' ]);
9090 } else {
9191 $ is_checked = true ;
9292 }
9393
94- if (isset ( $ _POST [ ' table_structure ' ]) && is_array ($ _POST [ 'table_structure ' ] )) {
95- $ structure_checked = $ this ->export ->getCheckedClause ($ each_table ['Name ' ], $ _POST [ 'table_structure ' ] );
94+ if (is_array ($ request -> getParsedBodyParam ( 'table_structure ' ) )) {
95+ $ structure_checked = $ this ->export ->getCheckedClause ($ each_table ['Name ' ], $ request -> getParsedBodyParam ( 'table_structure ' ) );
9696 } else {
9797 $ structure_checked = $ is_checked ;
9898 }
9999
100- if (isset ( $ _POST [ ' table_data ' ]) && is_array ($ _POST [ 'table_data ' ] )) {
101- $ data_checked = $ this ->export ->getCheckedClause ($ each_table ['Name ' ], $ _POST [ 'table_data ' ] );
100+ if (is_array ($ request -> getParsedBodyParam ( 'table_data ' ) )) {
101+ $ data_checked = $ this ->export ->getCheckedClause ($ each_table ['Name ' ], $ request -> getParsedBodyParam ( 'table_data ' ) );
102102 } else {
103103 $ data_checked = $ is_checked ;
104104 }
@@ -119,14 +119,14 @@ public function __invoke(ServerRequest $request): void
119119 $ GLOBALS ['unlim_num_rows ' ] = 0 ;
120120 }
121121
122- $ isReturnBackFromRawExport = isset ( $ _POST [ 'export_type ' ]) && $ _POST [ ' export_type ' ] === 'raw ' ;
123- if (isset ( $ _POST [ 'raw_query ' ] ) || $ isReturnBackFromRawExport ) {
122+ $ isReturnBackFromRawExport = $ request -> getParsedBodyParam ( 'export_type ' ) === 'raw ' ;
123+ if ($ request -> hasBodyParam ( 'raw_query ' ) || $ isReturnBackFromRawExport ) {
124124 $ export_type = 'raw ' ;
125125 } else {
126126 $ export_type = 'database ' ;
127127 }
128128
129- $ GLOBALS ['single_table ' ] = $ _POST [ 'single_table ' ] ?? $ _GET [ ' single_table ' ] ?? $ GLOBALS ['single_table ' ] ?? null ;
129+ $ GLOBALS ['single_table ' ] = $ request -> getParam ( 'single_table ' ) ?? $ GLOBALS ['single_table ' ] ?? null ;
130130
131131 $ exportList = Plugins::getExport ($ export_type , isset ($ GLOBALS ['single_table ' ]));
132132
@@ -151,7 +151,7 @@ public function __invoke(ServerRequest $request): void
151151 $ this ->render ('database/export/index ' , array_merge ($ options , [
152152 'page_settings_error_html ' => $ pageSettingsErrorHtml ,
153153 'page_settings_html ' => $ pageSettingsHtml ,
154- 'structure_or_data_forced ' => $ _POST [ 'structure_or_data_forced ' ] ?? 0 ,
154+ 'structure_or_data_forced ' => $ request -> getParsedBodyParam ( 'structure_or_data_forced ' , 0 ) ,
155155 'tables ' => $ tablesForMultiValues ,
156156 ]));
157157 }
0 commit comments