Code Duplication    Length = 4-4 lines in 2 locations

modules/calendar.php 2 locations

@@ 460-463 (lines=4) @@
457
				{
458
					trigger_error($this->user->lang['ACP_PORTAL_CALENDAR_START_INCORRECT']. adm_back_link($u_action), E_USER_WARNING);
459
				}
460
				else if (!$event_all_day && !$end_time)
461
				{
462
					trigger_error($this->user->lang['ACP_PORTAL_CALENDAR_END_INCORRECT']. adm_back_link($u_action), E_USER_WARNING);
463
				}
464
465
				if (($end_time) <= time() && !(($start_time + self::TIME_DAY) >= time() && $event_all_day))
466
				{
@@ 469-472 (lines=4) @@
466
				{
467
					trigger_error($this->user->lang['ACP_PORTAL_CALENDAR_EVENT_PAST']. adm_back_link($u_action), E_USER_WARNING);
468
				}
469
				else if ($end_time < $start_time && !$event_all_day)
470
				{
471
					trigger_error($this->user->lang['ACP_PORTAL_CALENDAR_EVENT_START_FIRST']. adm_back_link($u_action), E_USER_WARNING);
472
				}
473
474
				// get groups and check if the selected groups actually exist
475
				$sql = 'SELECT group_id