Code Duplication    Length = 5-6 lines in 2 locations

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

@@ 734-739 (lines=6) @@
731
							$rrule = calendar_rrule::event2rrule($recur_event, true);
732
							foreach ($rrule as $time)
733
							{
734
								if ($content['edit_single'] < $time->format('ts'))
735
								{
736
									$alarm['time'] = $time->format('ts') - $alarm['offset'];
737
									$this->bo->save_alarm($event['reference'], $alarm);
738
									break;
739
								}
740
							}
741
						}
742
					}

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

@@ 1945-1949 (lines=5) @@
1942
			{
1943
				calendar_so::shift_alarm($event, $alarm, $instance_date->format('ts'));
1944
			}
1945
			else if ($alarm['time'] !== $time->format('ts') - $alarm['offset'])
1946
			{
1947
				$alarm['time'] = $time->format('ts') - $alarm['offset'];
1948
				$this->save_alarm($event['id'], $alarm);
1949
			}
1950
		}
1951
	}
1952