@@ -40,7 +40,7 @@ public function add()
4040 // Regenerate the quick jump cache
4141 Container::get ('cache ' )->store ('quickjump ' , Cache::get_quickjump ());
4242
43- return Router::redirect (Router::pathFor ('editForum ' , array ( 'id ' => $ fid) ), __ ('Forum added redirect ' ));
43+ return Router::redirect (Router::pathFor ('editForum ' , [ 'id ' => $ fid] ), __ ('Forum added redirect ' ));
4444 } else {
4545 return Router::redirect (Router::pathFor ('adminForums ' ), __ ('Unable to add forum ' ));
4646 }
@@ -54,26 +54,26 @@ public function edit($req, $res, $args)
5454 if (Input::post ('save ' ) && Input::post ('read_forum_old ' )) {
5555
5656 // Forums parameters / TODO : better handling of wrong parameters
57- $ forum_data = array ( 'forum_name ' => Utils::escape (Input::post ('forum_name ' )),
57+ $ forum_data = [ 'forum_name ' => Utils::escape (Input::post ('forum_name ' )),
5858 'forum_desc ' => Input::post ('forum_desc ' ) ? Utils::linebreaks (Utils::trim (Input::post ('forum_desc ' ))) : NULL ,
5959 'cat_id ' => (int ) Input::post ('cat_id ' ),
6060 'sort_by ' => (int ) Input::post ('sort_by ' ),
61- 'redirect_url ' => Url::is_valid (Input::post ('redirect_url ' )) ? Utils::escape (Input::post ('redirect_url ' )) : NULL ) ;
61+ 'redirect_url ' => Url::is_valid (Input::post ('redirect_url ' )) ? Utils::escape (Input::post ('redirect_url ' )) : NULL ] ;
6262
6363 if ($ forum_data ['forum_name ' ] == '' ) {
64- return Router::redirect (Router::pathFor ('editForum ' , array ( 'id ' => $ args ['id ' ]) ), __ ('Must enter name message ' ));
64+ return Router::redirect (Router::pathFor ('editForum ' , [ 'id ' => $ args ['id ' ]] ), __ ('Must enter name message ' ));
6565 }
6666 if ($ forum_data ['cat_id ' ] < 1 ) {
67- return Router::redirect (Router::pathFor ('editForum ' , array ( 'id ' => $ args ['id ' ]) ), __ ('Must be valid category ' ));
67+ return Router::redirect (Router::pathFor ('editForum ' , [ 'id ' => $ args ['id ' ]] ), __ ('Must be valid category ' ));
6868 }
6969
7070 $ this ->model ->update_forum ($ args ['id ' ], $ forum_data );
7171
7272 // Permissions
7373 $ permissions = $ this ->model ->get_default_group_permissions (false );
7474 foreach ($ permissions as $ perm_group ) {
75- $ permissions_data = array ( 'group_id ' => $ perm_group ['g_id ' ],
76- 'forum_id ' => $ args ['id ' ]) ;
75+ $ permissions_data = [ 'group_id ' => $ perm_group ['g_id ' ],
76+ 'forum_id ' => $ args ['id ' ]] ;
7777 if ($ perm_group ['board.read ' ] == '1 ' && isset (Input::post ('read_forum_new ' )[$ perm_group ['g_id ' ]]) && Input::post ('read_forum_new ' )[$ perm_group ['g_id ' ]] == '1 ' ) {
7878 $ permissions_data ['read_forum ' ] = '1 ' ;
7979 }
@@ -100,29 +100,29 @@ public function edit($req, $res, $args)
100100 // Regenerate the quick jump cache
101101 Container::get ('cache ' )->store ('quickjump ' , Cache::get_quickjump ());
102102
103- return Router::redirect (Router::pathFor ('editForum ' , array ( 'id ' => $ args ['id ' ]) ), __ ('Forum updated redirect ' ));
103+ return Router::redirect (Router::pathFor ('editForum ' , [ 'id ' => $ args ['id ' ]] ), __ ('Forum updated redirect ' ));
104104
105105 } elseif (Input::post ('revert_perms ' )) {
106106 $ this ->model ->delete_permissions ($ args ['id ' ]);
107107
108108 // Regenerate the quick jump cache
109109 Container::get ('cache ' )->store ('quickjump ' , Cache::get_quickjump ());
110110
111- return Router::redirect (Router::pathFor ('editForum ' , array ( 'id ' => $ args ['id ' ]) ), __ ('Perms reverted redirect ' ));
111+ return Router::redirect (Router::pathFor ('editForum ' , [ 'id ' => $ args ['id ' ]] ), __ ('Perms reverted redirect ' ));
112112 }
113113
114114 } else {
115115 AdminUtils::generateAdminMenu ('forums ' );
116116
117- View::setPageInfo (array (
118- 'title ' => array ( Utils::escape (ForumSettings::get ('o_board_title ' )), __ ('Admin ' ), __ ('Forums ' )) ,
117+ View::setPageInfo ([
118+ 'title ' => [ Utils::escape (ForumSettings::get ('o_board_title ' )), __ ('Admin ' ), __ ('Forums ' )] ,
119119 'active_page ' => 'admin ' ,
120120 'admin_console ' => true ,
121121 'perm_data ' => $ this ->model ->get_permissions ($ args ['id ' ]),
122122 'cur_index ' => 7 ,
123123 'cur_forum ' => $ this ->model ->get_forum_info ($ args ['id ' ]),
124124 'forum_data ' => $ this ->model ->get_forums (),
125- )
125+ ]
126126 )->addTemplate ('admin/forums/permissions.php ' )->display ();
127127 }
128128 }
@@ -147,12 +147,12 @@ public function delete($req, $res, $args)
147147
148148 AdminUtils::generateAdminMenu ('forums ' );
149149
150- View::setPageInfo (array (
151- 'title ' => array ( Utils::escape (ForumSettings::get ('o_board_title ' )), __ ('Admin ' ), __ ('Forums ' )) ,
150+ View::setPageInfo ([
151+ 'title ' => [ Utils::escape (ForumSettings::get ('o_board_title ' )), __ ('Admin ' ), __ ('Forums ' )] ,
152152 'active_page ' => 'admin ' ,
153153 'admin_console ' => true ,
154154 'cur_forum ' => $ cur_forum
155- )
155+ ]
156156 )->addTemplate ('admin/forums/delete_forum.php ' )->display ();
157157 }
158158 }
@@ -183,14 +183,14 @@ public function display($req, $res, $args)
183183 AdminUtils::generateAdminMenu ('forums ' );
184184
185185 $ categories_model = new \FeatherBB \Model \Admin \Categories ();
186- View::setPageInfo (array (
187- 'title ' => array ( Utils::escape (ForumSettings::get ('o_board_title ' )), __ ('Admin ' ), __ ('Forums ' )) ,
186+ View::setPageInfo ([
187+ 'title ' => [ Utils::escape (ForumSettings::get ('o_board_title ' )), __ ('Admin ' ), __ ('Forums ' )] ,
188188 'active_page ' => 'admin ' ,
189189 'admin_console ' => true ,
190190 'cat_list ' => $ categories_model ->get_cat_list (),
191191 'forum_data ' => $ this ->model ->get_forums (),
192192 'cur_index ' => 4 ,
193- )
193+ ]
194194 )->addTemplate ('admin/forums/admin_forums.php ' )->display ();
195195 }
196196}
0 commit comments