Code Duplication    Length = 10-11 lines in 2 locations

mod/event_calendar/models/model.php 1 location

@@ 266-275 (lines=10) @@
263
		}
264
	}
265
266
	if ($event->save()) {
267
		if (!$event_guid && $event->web_conference) {
268
			if (!event_calendar_create_bbb_conf($event)) {
269
				register_error(elgg_echo('event_calendar:conference_create_error'));
270
			}
271
		}
272
		if ($group_guid && (elgg_get_plugin_setting('autogroup', 'event_calendar') == 'yes')) {
273
			event_calendar_add_personal_events_from_group($event->guid, $group_guid);
274
		}
275
	}
276
	return $event;
277
}
278

mod/gc_mobile_api/models/event.php 1 location

@@ 618-628 (lines=11) @@
615
	 }
616
617
	 if (!$error){
618
		 if ($event->save()){
619
620
			if (!$event_guid && $event->web_conference) {
621
				if (!event_calendar_create_bbb_conf($event)) {
622
					register_error(elgg_echo('event_calendar:conference_create_error'));
623
				}
624
			}
625
			if ($group_guid && (elgg_get_plugin_setting('autogroup', 'event_calendar') == 'yes')) {
626
				event_calendar_add_personal_events_from_group($event->guid, $group_guid);
627
			}
628
		}
629
		return $event;
630
631
	} else {