@@ -21,35 +21,35 @@ public function __construct()
2121 $ this ->feather = \Slim \Slim::getInstance ();
2222 $ this ->start = $ this ->feather ->start ;
2323 $ this ->config = $ this ->feather ->config ;
24- $ this ->user = $ this -> feather -> user ;
24+ $ this ->user = Container:: get ( ' user ' ) ;
2525 $ this ->request = $ this ->feather ->request ;
2626 $ this ->model = new \FeatherBB \Model \Admin \Forums ();
2727 load_textdomain ('featherbb ' , $ this ->feather ->forum_env ['FEATHER_ROOT ' ].'featherbb/lang/ ' .$ this ->user ->language .'/admin/forums.mo ' );
2828 }
2929
3030 public function add ()
3131 {
32- $ this -> feather -> hooks ->fire ('controller.admin.forums.add ' );
32+ Container:: get ( ' hooks ' ) ->fire ('controller.admin.forums.add ' );
3333
3434 $ cat_id = (int ) $ this ->request ->post ('cat ' );
3535
3636 if ($ cat_id < 1 ) {
37- Url ::redirect ($ this -> feather -> urlFor ('adminForums ' ), __ ('Must be valid category ' ));
37+ Router ::redirect (Router:: pathFor ('adminForums ' ), __ ('Must be valid category ' ));
3838 }
3939
4040 if ($ fid = $ this ->model ->add_forum ($ cat_id , __ ('New forum ' ))) {
4141 // Regenerate the quick jump cache
4242 $ this ->feather ->cache ->store ('quickjump ' , Cache::get_quickjump ());
4343
44- Url ::redirect ($ this -> feather -> urlFor ('editForum ' , array ('id ' => $ fid )), __ ('Forum added redirect ' ));
44+ Router ::redirect (Router:: pathFor ('editForum ' , array ('id ' => $ fid )), __ ('Forum added redirect ' ));
4545 } else {
46- Url ::redirect ($ this -> feather -> urlFor ('adminForums ' ), __ ('Unable to add forum ' ));
46+ Router ::redirect (Router:: pathFor ('adminForums ' ), __ ('Unable to add forum ' ));
4747 }
4848 }
4949
5050 public function edit ($ forum_id )
5151 {
52- $ this -> feather -> hooks ->fire ('controller.admin.forums.edit ' );
52+ Container:: get ( ' hooks ' ) ->fire ('controller.admin.forums.edit ' );
5353
5454 if ($ this ->request ->isPost ()) {
5555 if ($ this ->request ->post ('save ' ) && $ this ->request ->post ('read_forum_old ' )) {
@@ -62,10 +62,10 @@ public function edit($forum_id)
6262 'redirect_url ' => Url::is_valid ($ this ->request ->post ('redirect_url ' )) ? Utils::escape ($ this ->request ->post ('redirect_url ' )) : NULL );
6363
6464 if ($ forum_data ['forum_name ' ] == '' ) {
65- Url ::redirect ($ this -> feather -> urlFor ('editForum ' , array ('id ' => $ forum_id )), __ ('Must enter name message ' ));
65+ Router ::redirect (Router:: pathFor ('editForum ' , array ('id ' => $ forum_id )), __ ('Must enter name message ' ));
6666 }
6767 if ($ forum_data ['cat_id ' ] < 1 ) {
68- Url ::redirect ($ this -> feather -> urlFor ('editForum ' , array ('id ' => $ forum_id )), __ ('Must be valid category ' ));
68+ Router ::redirect (Router:: pathFor ('editForum ' , array ('id ' => $ forum_id )), __ ('Must be valid category ' ));
6969 }
7070
7171 $ this ->model ->update_forum ($ forum_id , $ forum_data );
@@ -101,15 +101,15 @@ public function edit($forum_id)
101101 // Regenerate the quick jump cache
102102 $ this ->feather ->cache ->store ('quickjump ' , Cache::get_quickjump ());
103103
104- Url ::redirect ($ this -> feather -> urlFor ('editForum ' , array ('id ' => $ forum_id )), __ ('Forum updated redirect ' ));
104+ Router ::redirect (Router:: pathFor ('editForum ' , array ('id ' => $ forum_id )), __ ('Forum updated redirect ' ));
105105
106106 } elseif ($ this ->request ->post ('revert_perms ' )) {
107107 $ this ->model ->delete_permissions ($ forum_id );
108108
109109 // Regenerate the quick jump cache
110110 $ this ->feather ->cache ->store ('quickjump ' , Cache::get_quickjump ());
111111
112- Url ::redirect ($ this -> feather -> urlFor ('editForum ' , array ('id ' => $ forum_id )), __ ('Perms reverted redirect ' ));
112+ Router ::redirect (Router:: pathFor ('editForum ' , array ('id ' => $ forum_id )), __ ('Perms reverted redirect ' ));
113113 }
114114
115115 } else {
@@ -130,14 +130,14 @@ public function edit($forum_id)
130130
131131 public function delete ($ forum_id )
132132 {
133- $ this -> feather -> hooks ->fire ('controller.admin.forums.delete ' );
133+ Container:: get ( ' hooks ' ) ->fire ('controller.admin.forums.delete ' );
134134
135135 if ($ this ->request ->isPost ()) {
136136 $ this ->model ->delete_forum ($ forum_id );
137137 // Regenerate the quick jump cache
138138 $ this ->feather ->cache ->store ('quickjump ' , Cache::get_quickjump ());
139139
140- Url ::redirect ($ this -> feather -> urlFor ('adminForums ' ), __ ('Forum deleted redirect ' ));
140+ Router ::redirect (Router:: pathFor ('adminForums ' ), __ ('Forum deleted redirect ' ));
141141
142142 } else { // If the user hasn't confirmed
143143
@@ -155,7 +155,7 @@ public function delete($forum_id)
155155
156156 public function edit_positions ()
157157 {
158- $ this -> feather -> hooks ->fire ('controller.admin.forums.edit_positions ' );
158+ Container:: get ( ' hooks ' ) ->fire ('controller.admin.forums.edit_positions ' );
159159
160160 foreach ($ this ->request ->post ('position ' ) as $ forum_id => $ position ) {
161161 $ position = (int ) Utils::trim ($ position );
@@ -165,12 +165,12 @@ public function edit_positions()
165165 // Regenerate the quick jump cache
166166 $ this ->feather ->cache ->store ('quickjump ' , Cache::get_quickjump ());
167167
168- Url ::redirect ($ this -> feather -> urlFor ('adminForums ' ), __ ('Forums updated redirect ' ));
168+ Router ::redirect (Router:: pathFor ('adminForums ' ), __ ('Forums updated redirect ' ));
169169 }
170170
171171 public function display ()
172172 {
173- $ this -> feather -> hooks ->fire ('controller.admin.forums.display ' );
173+ Container:: get ( ' hooks ' ) ->fire ('controller.admin.forums.display ' );
174174
175175 if ($ this ->request ->post ('update_positions ' )) {
176176 $ this ->edit_positions ();
0 commit comments