@@ -179,13 +179,13 @@ public function dealposts($req, $res, $args)
179179 $ topicModel = new \FeatherBB \Model \Topic ();
180180
181181 // Move one or more topics
182- if ($ this -> feather -> request -> post ('move_topics ' ) || $ this -> feather -> request -> post ('move_topics_to ' )) {
183- $ topics = $ this -> feather -> request -> post ('topics ' ) ? $ this -> feather -> request -> post ('topics ' ) : array ();
182+ if (Input:: post ('move_topics ' ) || Input:: post ('move_topics_to ' )) {
183+ $ topics = Input:: post ('topics ' ) ? Input:: post ('topics ' ) : array ();
184184 if (empty ($ topics )) {
185185 throw new Error (__ ('No topics selected ' ), 400 );
186186 }
187187
188- if ($ new_fid = $ this -> feather -> request -> post ('move_to_forum ' )) {
188+ if ($ new_fid = Input:: post ('move_to_forum ' )) {
189189 $ topics = explode (', ' , $ topics );
190190 $ topicModel ->move_to ($ args ['fid ' ], $ new_fid , $ topics );
191191 Router::redirect (Router::pathFor ('Forum ' , ['id ' => $ new_fid ]), __ ('Move topics redirect ' ));
@@ -208,13 +208,13 @@ public function dealposts($req, $res, $args)
208208 }
209209
210210 // Merge two or more topics
211- elseif ($ this -> feather -> request -> post ('merge_topics ' ) || $ this -> feather -> request -> post ('merge_topics_comply ' )) {
212- if ($ this -> feather -> request -> post ('merge_topics_comply ' )) {
211+ elseif (Input:: post ('merge_topics ' ) || Input:: post ('merge_topics_comply ' )) {
212+ if (Input:: post ('merge_topics_comply ' )) {
213213 $ this ->model ->merge_topics ($ args ['fid ' ]);
214214 Router::redirect (Router::pathFor ('Forum ' , array ('id ' => $ args ['fid ' ])), __ ('Merge topics redirect ' ));
215215 }
216216
217- $ topics = $ this -> feather -> request -> post ('topics ' ) ? $ this -> feather -> request -> post ('topics ' ) : array ();
217+ $ topics = Input:: post ('topics ' ) ? Input:: post ('topics ' ) : array ();
218218 if (count ($ topics ) < 2 ) {
219219 throw new Error (__ ('Not enough topics selected ' ), 400 );
220220 }
@@ -229,13 +229,13 @@ public function dealposts($req, $res, $args)
229229 }
230230
231231 // Delete one or more topics
232- elseif ($ this -> feather -> request -> post ('delete_topics ' ) || $ this -> feather -> request -> post ('delete_topics_comply ' )) {
233- $ topics = $ this -> feather -> request -> post ('topics ' ) ? $ this -> feather -> request -> post ('topics ' ) : array ();
232+ elseif (Input:: post ('delete_topics ' ) || Input:: post ('delete_topics_comply ' )) {
233+ $ topics = Input:: post ('topics ' ) ? Input:: post ('topics ' ) : array ();
234234 if (empty ($ topics )) {
235235 throw new Error (__ ('No topics selected ' ), 400 );
236236 }
237237
238- if ($ this -> feather -> request -> post ('delete_topics_comply ' )) {
238+ if (Input:: post ('delete_topics_comply ' )) {
239239 $ this ->model ->delete_topics ($ topics , $ args ['fid ' ]);
240240 Router::redirect (Router::pathFor ('Forum ' , array ('id ' => $ args ['fid ' ])), __ ('Delete topics redirect ' ));
241241 }
@@ -251,12 +251,12 @@ public function dealposts($req, $res, $args)
251251
252252
253253 // Open or close one or more topics
254- elseif ($ this -> feather -> request -> post ('open ' ) || $ this -> feather -> request -> post ('close ' )) {
255- $ action = ($ this -> feather -> request -> post ('open ' )) ? 0 : 1 ;
254+ elseif (Input:: post ('open ' ) || Input:: post ('close ' )) {
255+ $ action = (Input:: post ('open ' )) ? 0 : 1 ;
256256
257257 // There could be an array of topic IDs in $_POST
258- if ($ this -> feather -> request -> post ('open ' ) || $ this -> feather -> request -> post ('close ' )) {
259- $ topics = $ this -> feather -> request -> post ('topics ' ) ? @array_map ('intval ' , @array_keys ($ this -> feather -> request -> post ('topics ' ))) : array ();
258+ if (Input:: post ('open ' ) || Input:: post ('close ' )) {
259+ $ topics = Input:: post ('topics ' ) ? @array_map ('intval ' , @array_keys (Input:: post ('topics ' ))) : array ();
260260 if (empty ($ topics )) {
261261 throw new Error (__ ('No topics selected ' ), 400 );
262262 }
0 commit comments