@@ -36,7 +36,7 @@ public function fetch_groups()
3636 $ groups [$ cur_group ['g_id ' ]] = $ cur_group ;
3737 }
3838
39- $ groups = $ this ->hook ->fire ('fetch_groups ' , $ groups );
39+ $ groups = $ this ->hook ->fire ('model. fetch_groups ' , $ groups );
4040
4141 return $ groups ;
4242 }
@@ -47,7 +47,7 @@ public function info_add_group($groups, $id)
4747
4848 if ($ this ->request ->post ('add_group ' )) {
4949 $ group ['base_group ' ] = intval ($ this ->request ->post ('base_group ' ));
50- $ group ['base_group ' ] = $ this ->hook ->fire ('add_user_group ' , $ group ['base_group ' ]);
50+ $ group ['base_group ' ] = $ this ->hook ->fire ('model. add_user_group ' , $ group ['base_group ' ]);
5151 $ group ['info ' ] = $ groups [$ group ['base_group ' ]];
5252
5353 $ group ['mode ' ] = 'add ' ;
@@ -57,14 +57,14 @@ public function info_add_group($groups, $id)
5757 throw new Error (__ ('Bad request ' ), 404 );
5858 }
5959
60- $ groups [$ id ] = $ this ->hook ->fire ('update_user_group ' , $ groups [$ id ]);
60+ $ groups [$ id ] = $ this ->hook ->fire ('model. update_user_group ' , $ groups [$ id ]);
6161
6262 $ group ['info ' ] = $ groups [$ id ];
6363
6464 $ group ['mode ' ] = 'edit ' ;
6565 }
6666
67- $ group = $ this ->hook ->fire ('info_add_group ' , $ group );
67+ $ group = $ this ->hook ->fire ('model. info_add_group ' , $ group );
6868 return $ group ;
6969 }
7070
@@ -82,13 +82,13 @@ public function get_group_list($groups, $group)
8282 }
8383 }
8484
85- $ output = $ this ->hook ->fire ('get_group_list ' , $ output );
85+ $ output = $ this ->hook ->fire ('model. get_group_list ' , $ output );
8686 return $ output ;
8787 }
8888
8989 public function get_group_list_delete ($ group_id )
9090 {
91- $ group_id = $ this ->hook ->fire ('get_group_list_delete_start ' , $ group_id );
91+ $ group_id = $ this ->hook ->fire ('model. get_group_list_delete_start ' , $ group_id );
9292
9393 $ select_get_group_list_delete = array ('g_id ' , 'g_title ' );
9494 $ result = DB ::for_table ('groups ' )->select_many ($ select_get_group_list_delete )
@@ -109,7 +109,7 @@ public function get_group_list_delete($group_id)
109109 }
110110 }
111111
112- $ output = $ this ->hook ->fire ('get_group_list.output ' , $ output );
112+ $ output = $ this ->hook ->fire ('model. get_group_list.output ' , $ output );
113113 return $ output ;
114114 }
115115
@@ -121,7 +121,7 @@ public function add_edit_group($groups)
121121 $ group_id = 0 ;
122122 }
123123
124- $ group_id = $ this ->hook ->fire ('add_edit_group_start ' , $ group_id );
124+ $ group_id = $ this ->hook ->fire ('model. add_edit_group_start ' , $ group_id );
125125
126126 // Is this the admin group? (special rules apply)
127127 $ is_admin_group = ($ this ->request ->post ('group_id ' ) && $ this ->request ->post ('group_id ' ) == $ this ->feather ->forum_env ['FEATHER_ADMIN ' ]) ? true : false ;
@@ -131,11 +131,11 @@ public function add_edit_group($groups)
131131 if ($ title == '' ) {
132132 throw new Error (__ ('Must enter title message ' ), 400 );
133133 }
134- $ title = $ this ->hook ->fire ('add_edit_group_set_title ' , $ title );
134+ $ title = $ this ->hook ->fire ('model. add_edit_group_set_title ' , $ title );
135135 // Set user title
136136 $ user_title = Utils::trim ($ this ->request ->post ('user_title ' ));
137137 $ user_title = ($ user_title != '' ) ? $ user_title : 'NULL ' ;
138- $ user_title = $ this ->hook ->fire ('add_edit_group_set_user_title ' , $ user_title );
138+ $ user_title = $ this ->hook ->fire ('model. add_edit_group_set_user_title ' , $ user_title );
139139
140140 $ promote_min_posts = $ this ->request ->post ('promote_min_posts ' ) ? intval ($ this ->request ->post ('promote_min_posts ' )) : '0 ' ;
141141 if ($ this ->request ->post ('promote_next_group ' ) &&
@@ -199,7 +199,7 @@ public function add_edit_group($groups)
199199 'g_report_flood ' => $ report_flood ,
200200 );
201201
202- $ insert_update_group = $ this ->hook ->fire ('add_edit_group_data ' , $ insert_update_group );
202+ $ insert_update_group = $ this ->hook ->fire ('model. add_edit_group_data ' , $ insert_update_group );
203203
204204 if ($ this ->request ->post ('mode ' ) == 'add ' ) {
205205 // Creating a new group
@@ -213,7 +213,7 @@ public function add_edit_group($groups)
213213 ->set ($ insert_update_group )
214214 ->save ();
215215 $ new_group_id = DB ::get_db ()->lastInsertId ($ this ->feather ->forum_settings ['db_prefix ' ].'groups ' );
216- $ new_group_id = $ this ->hook ->fire ('add_edit_group.new_group_id ' , $ new_group_id );
216+ $ new_group_id = $ this ->hook ->fire ('model. add_edit_group.new_group_id ' , $ new_group_id );
217217
218218 // Now lets copy the forum specific permissions from the group which this group is based on
219219 $ select_forum_perms = array ('forum_id ' , 'read_forum ' , 'post_replies ' , 'post_topics ' );
@@ -256,7 +256,7 @@ public function add_edit_group($groups)
256256 }
257257
258258 $ group_id = $ this ->request ->post ('mode ' ) == 'add ' ? $ new_group_id : $ this ->request ->post ('group_id ' );
259- $ group_id = $ this ->hook ->fire ('add_edit_group.group_id ' , $ group_id );
259+ $ group_id = $ this ->hook ->fire ('model. add_edit_group.group_id ' , $ group_id );
260260
261261 // Regenerate the quick jump cache
262262 $ this ->feather ->cache ->store ('quickjump ' , Cache::get_quickjump ());
@@ -271,7 +271,7 @@ public function add_edit_group($groups)
271271 public function set_default_group ($ groups )
272272 {
273273 $ group_id = intval ($ this ->request ->post ('default_group ' ));
274- $ group_id = $ this ->hook ->fire ('set_default_group.group_id ' , $ group_id );
274+ $ group_id = $ this ->hook ->fire ('model. set_default_group.group_id ' , $ group_id );
275275
276276 // Make sure it's not the admin or guest groups
277277 if ($ group_id == $ this ->feather ->forum_env ['FEATHER_ADMIN ' ] || $ group_id == $ this ->feather ->forum_env ['FEATHER_GUEST ' ]) {
@@ -294,7 +294,7 @@ public function set_default_group($groups)
294294
295295 public function check_members ($ group_id )
296296 {
297- $ group_id = $ this ->hook ->fire ('check_members_start ' , $ group_id );
297+ $ group_id = $ this ->hook ->fire ('model. check_members_start ' , $ group_id );
298298
299299 $ is_member = DB ::for_table ('groups ' )->table_alias ('g ' )
300300 ->select ('g.g_title ' )
@@ -311,11 +311,11 @@ public function check_members($group_id)
311311
312312 public function delete_group ($ group_id )
313313 {
314- $ group_id = $ this ->hook ->fire ('delete_group.group_id ' , $ group_id );
314+ $ group_id = $ this ->hook ->fire ('model. delete_group.group_id ' , $ group_id );
315315
316316 if ($ this ->request ->post ('del_group ' )) {
317317 $ move_to_group = intval ($ this ->request ->post ('move_to_group ' ));
318- $ move_to_group = $ this ->hook ->fire ('delete_group.move_to_group ' , $ move_to_group );
318+ $ move_to_group = $ this ->hook ->fire ('model. delete_group.move_to_group ' , $ move_to_group );
319319 DB ::for_table ('users ' )->where ('group_id ' , $ group_id )
320320 ->update_many ('group_id ' , $ move_to_group );
321321 }
@@ -348,7 +348,7 @@ public function get_group_title($group_id)
348348
349349 public function get_title_members ($ group_id )
350350 {
351- $ group_id = $ this ->hook ->fire ('get_title_members.group_id ' , $ group_id );
351+ $ group_id = $ this ->hook ->fire ('model. get_title_members.group_id ' , $ group_id );
352352
353353 $ group = DB ::for_table ('groups ' )->table_alias ('g ' )
354354 ->select ('g.g_title ' )
@@ -363,7 +363,7 @@ public function get_title_members($group_id)
363363 $ group_info ['title ' ] = $ group ['g_title ' ];
364364 $ group_info ['members ' ] = $ group ['members ' ];
365365
366- $ group_info = $ this ->hook ->fire ('get_title_members.group_info ' , $ group_info );
366+ $ group_info = $ this ->hook ->fire ('model. get_title_members.group_info ' , $ group_info );
367367 return $ group_info ;
368368 }
369369}
0 commit comments