Code Duplication    Length = 7-7 lines in 3 locations

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

@@ 1010-1016 (lines=7) @@
1007
				}
1008
			}
1009
			// same with the alarms
1010
			if (isset($event['alarm']) && is_array($event['alarm']))
1011
			{
1012
				foreach($event['alarm'] as &$alarm)
1013
				{
1014
					$alarm['time'] = $this->date2usertime((int)$alarm['time'],$date_format);
1015
				}
1016
			}
1017
		}
1018
	}
1019

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

@@ 2816-2822 (lines=7) @@
2813
			if (isset($event[$ts])) $event[$ts] = $event[$ts] ? $this->date2usertime($event[$ts]) : 0;
2814
		}
2815
		// same with the recur exceptions
2816
		if (isset($event['recur_exception']) && is_array($event['recur_exception']))
2817
		{
2818
			foreach($event['recur_exception'] as $n => $date)
2819
			{
2820
				$event['recur_exception'][$n] = $this->date2usertime($date);
2821
			}
2822
		}
2823
		// same with the alarms
2824
		if (isset($event['alarm']) && is_array($event['alarm']))
2825
		{
@@ 2824-2830 (lines=7) @@
2821
			}
2822
		}
2823
		// same with the alarms
2824
		if (isset($event['alarm']) && is_array($event['alarm']))
2825
		{
2826
			foreach($event['alarm'] as $id => $alarm)
2827
			{
2828
				$event['alarm'][$id]['time'] = $this->date2usertime($alarm['time']);
2829
			}
2830
		}
2831
    }
2832
	/**
2833
	 * Delete events that are more than $age years old