Code Duplication    Length = 5-5 lines in 2 locations

calendar/inc/class.calendar_ical.inc.php 2 locations

@@ 1824-1828 (lines=5) @@
1821
			foreach($old_alarms as $id => $old_alarm)
1822
			{
1823
				// not current users alarm --> ignore
1824
				if (!$old_alarm['all'] && $old_alarm['owner'] != $user)
1825
				{
1826
					unset($old_alarm[$id]);
1827
					continue;
1828
				}
1829
				// alarm found --> stop
1830
				if (empty($alarm['uid']) && $alarm['offset'] == $old_alarm['offset'] || $alarm['uid'] && $alarm['uid'] == $old_alarm['uid'])
1831
				{
@@ 1861-1865 (lines=5) @@
1858
		foreach($old_alarms as $id => $old_alarm)
1859
		{
1860
			// not current users alarm --> ignore
1861
			if (!$old_alarm['all'] && $old_alarm['owner'] != $user)
1862
			{
1863
				unset($old_alarm[$id]);
1864
				continue;
1865
			}
1866
			if ($this->debug) error_log(__METHOD__."() deleting alarm '$id' deleted on client ".array2string($old_alarm));
1867
			$this->delete_alarm($id);
1868
			++$modified;