Code Duplication    Length = 6-6 lines in 2 locations

programs/caldav.class.php 2 locations

@@ 739-744 (lines=6) @@
736
		if ($expandRecurrence) {
737
			// If recurrent events should be expanded and no expand range has been specified, we
738
			// limit to +/- 5 years.
739
			if (!isset($expandStart)) {
740
				require_once $GLOBALS['babInstallPath'] . 'utilit/dateTime.php';
741
				$expandStart = BAB_DateTime::now();
742
				$expandStart->add(-5, BAB_DATETIME_YEAR);
743
				$expandStart = $expandStart->getICal();
744
			}
745
			if (!isset($expandEnd)) {
746
				require_once $GLOBALS['babInstallPath'] . 'utilit/dateTime.php';
747
				$expandEnd = BAB_DateTime::now();
@@ 745-750 (lines=6) @@
742
				$expandStart->add(-5, BAB_DATETIME_YEAR);
743
				$expandStart = $expandStart->getICal();
744
			}
745
			if (!isset($expandEnd)) {
746
				require_once $GLOBALS['babInstallPath'] . 'utilit/dateTime.php';
747
				$expandEnd = BAB_DateTime::now();
748
				$expandEnd->add(5, BAB_DATETIME_YEAR);
749
				$expandEnd = $expandEnd->getICal();
750
			}
751
		}
752
753
		foreach ($eventsData[1] as $eventData) {