Code Duplication    Length = 14-20 lines in 2 locations

engine/lib/notification.php 1 location

@@ 324-337 (lines=14) @@
321
/**
322
 * @access private
323
 */
324
function _elgg_notifications_init() {
325
	elgg_register_plugin_hook_handler('cron', 'minute', '_elgg_notifications_cron', 100);
326
	elgg_register_event_handler('all', 'all', '_elgg_enqueue_notification_event');
327
328
	// add email notifications
329
	elgg_register_notification_method('email');
330
	elgg_register_plugin_hook_handler('send', 'notification:email', '_elgg_send_email_notification');
331
	elgg_register_plugin_hook_handler('email', 'system', '_elgg_notifications_smtp_default_message_id_header', 1);
332
	elgg_register_plugin_hook_handler('email', 'system', '_elgg_notifications_smtp_thread_headers');
333
334
	// add ability to set personal notification method
335
	elgg_extend_view('forms/account/settings', 'core/settings/account/notifications');
336
	elgg_register_plugin_hook_handler('usersettings:save', 'user', '_elgg_save_notification_user_settings');
337
}
338
339
/**
340
 * Notify a user via their preferences.

mod/analytics/start.php 1 location

@@ 20-39 (lines=20) @@
17
 *
18
 * @return void
19
 */
20
function analytics_init() {
21
	// load Google Analytics JS
22
	elgg_extend_view('page/elements/head', 'analytics/head/google', 999);
23
	elgg_extend_view('page/elements/head', 'analytics/head/piwik', 999);
24
	
25
	// extend the page footer
26
	elgg_extend_view('page/elements/foot', 'analytics/footer', 999);
27
	
28
	// register page handler
29
	elgg_register_page_handler('analytics', '\ColdTrick\Analytics\PageHandler::analytics');
30
	
31
	// register tracking events
32
	elgg_register_event_handler('all', 'object', '\ColdTrick\Analytics\Tracker::events');
33
	elgg_register_event_handler('all', 'group', '\ColdTrick\Analytics\Tracker::events');
34
	elgg_register_event_handler('all', 'user', '\ColdTrick\Analytics\Tracker::events');
35
	
36
	// register plugin hooks
37
	elgg_register_plugin_hook_handler('action', 'all', '\ColdTrick\Analytics\Tracker::actions');
38
	
39
}
40