Code Duplication    Length = 5-9 lines in 2 locations

calendar/inc/class.calendar_boupdate.inc.php 1 location

@@ 1216-1220 (lines=5) @@
1213
				$event['end'] = Api\DateTime::to($time, 'ts');
1214
				$save_event['end'] = $time;
1215
			}
1216
			if (!empty($event['recurrence']))
1217
			{
1218
				$time = $this->so->startOfDay(new Api\DateTime($event['recurrence'], Api\DateTime::$user_timezone));
1219
				$event['recurrence'] = Api\DateTime::to($time, 'ts');
1220
			}
1221
			if (!empty($event['recur_enddate']))
1222
			{
1223
				$time = $this->so->startOfDay(new Api\DateTime($event['recur_enddate'], Api\DateTime::$user_timezone));

calendar/inc/class.calendar_uiforms.inc.php 1 location

@@ 1519-1527 (lines=9) @@
1516
				$preserv['actual_date'] = $event['start'];		// remember the date clicked
1517
				if ($event['recur_type'] != MCAL_RECUR_NONE)
1518
				{
1519
					if (empty($event['whole_day']))
1520
					{
1521
						$date = $_GET['date'];
1522
					}
1523
					else
1524
					{
1525
						$date = $this->bo->so->startOfDay(new Api\DateTime($_GET['date'], Api\DateTime::$user_timezone));
1526
						$date->setUser();
1527
					}
1528
					$event = $this->bo->read($cal_id, $date, true);
1529
					$preserv['actual_date'] = $event['start'];		// remember the date clicked
1530
					if ($_GET['exception'])