@@ -96,6 +96,27 @@ function group_tools_init(){
9696 elgg_register_widget_type ("discussion " , elgg_echo ("discussion:latest " ), elgg_echo ("widgets:discussion:description " ), "index,dashboard " , true );
9797 elgg_register_widget_type ("group_forum_topics " , elgg_echo ("discussion:group " ), elgg_echo ("widgets:group_forum_topics:description " ), "groups " );
9898
99+ // register events
100+ elgg_register_event_handler ("join " , "group " , "group_tools_join_group_event " );
101+
102+ // register plugin hooks
103+ elgg_register_plugin_hook_handler ("widget_url " , "widget_manager " , "group_tools_widget_url_handler " );
104+ elgg_register_plugin_hook_handler ("access:default " , "user " , "group_tools_access_default_handler " );
105+ elgg_register_plugin_hook_handler ("access:collections:write " , "user " , "group_tools_access_write_handler " );
106+
107+ // actions
108+ elgg_register_action ("group_tools/admin_transfer " , dirname (__FILE__ ) . "/actions/admin_transfer.php " );
109+ elgg_register_action ("group_tools/toggle_admin " , dirname (__FILE__ ) . "/actions/toggle_admin.php " );
110+ elgg_register_action ("group_tools/mail " , dirname (__FILE__ ) . "/actions/mail.php " );
111+ elgg_register_action ("group_tools/profile_widgets " , dirname (__FILE__ ) . "/actions/profile_widgets.php " );
112+ elgg_register_action ("group_tools/cleanup " , dirname (__FILE__ ) . "/actions/cleanup.php " );
113+ elgg_register_action ("group_tools/default_access " , dirname (__FILE__ ) . "/actions/default_access.php " );
114+
115+ elgg_register_action ("group_tools/toggle_auto_join " , dirname (__FILE__ ) . "/actions/toggle_auto_join.php " , "admin " );
116+ elgg_register_action ("group_tools/fix_auto_join " , dirname (__FILE__ ) . "/actions/fix_auto_join.php " , "admin " );
117+ elgg_register_action ("group_tools/notifications " , dirname (__FILE__ ) . "/actions/notifications.php " , "admin " );
118+
119+ elgg_register_action ("groups/email_invitation " , dirname (__FILE__ ) . "/actions/groups/email_invitation.php " );
99120 }
100121
101122 function group_tools_ready (){
@@ -227,26 +248,3 @@ function group_tools_version_1_3(){
227248 elgg_register_event_handler ("init " , "system " , "group_tools_init " );
228249 elgg_register_event_handler ("ready " , "system " , "group_tools_ready " );
229250 elgg_register_event_handler ("pagesetup " , "system " , "group_tools_pagesetup " , 550 );
230-
231- // register events
232- elgg_register_event_handler ("join " , "group " , "group_tools_join_group_event " );
233-
234- // register plugin hooks
235- elgg_register_plugin_hook_handler ("widget_url " , "widget_manager " , "group_tools_widget_url_handler " );
236- elgg_register_plugin_hook_handler ("access:default " , "user " , "group_tools_access_default_handler " );
237- elgg_register_plugin_hook_handler ("access:collections:write " , "user " , "group_tools_access_write_handler " );
238-
239- // actions
240- elgg_register_action ("group_tools/admin_transfer " , dirname (__FILE__ ) . "/actions/admin_transfer.php " );
241- elgg_register_action ("group_tools/toggle_admin " , dirname (__FILE__ ) . "/actions/toggle_admin.php " );
242- elgg_register_action ("group_tools/mail " , dirname (__FILE__ ) . "/actions/mail.php " );
243- elgg_register_action ("group_tools/profile_widgets " , dirname (__FILE__ ) . "/actions/profile_widgets.php " );
244- elgg_register_action ("group_tools/cleanup " , dirname (__FILE__ ) . "/actions/cleanup.php " );
245- elgg_register_action ("group_tools/default_access " , dirname (__FILE__ ) . "/actions/default_access.php " );
246-
247- elgg_register_action ("group_tools/toggle_auto_join " , dirname (__FILE__ ) . "/actions/toggle_auto_join.php " , "admin " );
248- elgg_register_action ("group_tools/fix_auto_join " , dirname (__FILE__ ) . "/actions/fix_auto_join.php " , "admin " );
249- elgg_register_action ("group_tools/notifications " , dirname (__FILE__ ) . "/actions/notifications.php " , "admin " );
250-
251- elgg_register_action ("groups/email_invitation " , dirname (__FILE__ ) . "/actions/groups/email_invitation.php " );
252-
0 commit comments