Code Duplication    Length = 11-11 lines in 2 locations

mod/event_calendar/start.php 2 locations

@@ 415-425 (lines=11) @@
412
	return $result;
413
}
414
415
function event_calendar_handle_join($event, $object_type, $object) {
416
	elgg_load_library('elgg:event_calendar');
417
	$group = $object['group'];
418
	$user = $object['user'];
419
	$user_guid = $user->getGUID();
420
	$events = event_calendar_get_events_for_group($group->getGUID());
421
	foreach ($events as $event) {
422
		$event_id = $event->getGUID();
423
		event_calendar_add_personal_event($event_id, $user_guid);
424
	}
425
}
426
427
function event_calendar_handle_leave($event, $object_type, $object) {
428
	elgg_load_library('elgg:event_calendar');
@@ 427-437 (lines=11) @@
424
	}
425
}
426
427
function event_calendar_handle_leave($event, $object_type, $object) {
428
	elgg_load_library('elgg:event_calendar');
429
	$group = $object['group'];
430
	$user = $object['user'];
431
	$user_guid = $user->getGUID();
432
	$events = event_calendar_get_events_for_group($group->getGUID());
433
	foreach ($events as $event) {
434
		$event_id = $event->getGUID();
435
		event_calendar_remove_personal_event($event_id, $user_guid);
436
	}
437
}
438
439
function event_calendar_handle_reminders_cron() {
440
	elgg_load_library('elgg:event_calendar');