Code Duplication    Length = 4-4 lines in 6 locations

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

@@ 789-792 (lines=4) @@
786
			empty($event['tzid']) || empty($to_tz) ||
787
			$event['tzid'] == $to_tz) return;
788
789
		if (!isset(self::$tz_cache[$event['tzid']]))
790
		{
791
			self::$tz_cache[$event['tzid']] = calendar_timezones::DateTimeZone($event['tzid']);
792
		}
793
		if (!isset(self::$tz_cache[$to_tz]))
794
		{
795
			self::$tz_cache[$to_tz] = calendar_timezones::DateTimeZone($to_tz);

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

@@ 872-875 (lines=4) @@
869
				self::$tz_cache[$tzid] = calendar_timezones::DateTimeZone($tzid);
870
			}
871
		}
872
		if (!isset(self::$tz_cache[$event['tzid']]))
873
		{
874
			self::$tz_cache[$event['tzid']] = calendar_timezones::DateTimeZone($event['tzid']);
875
		}
876
877
		if ($recur_date && ($master = $this->read($_id, 0, true, 'server')))
878
		{

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

@@ 2913-2916 (lines=4) @@
2910
		}
2911
		else
2912
		{
2913
			if (!isset(self::$tz_cache[$event['tzid']]))
2914
			{
2915
				self::$tz_cache[$event['tzid']] = calendar_timezones::DateTimeZone($event['tzid']);
2916
			}
2917
			$timezone = self::$tz_cache[$event['tzid']];
2918
		}
2919
		$start_time = new egw_time($event['start'],egw_time::$server_timezone);

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

@@ 307-310 (lines=4) @@
304
				$tzid = $event['tzid'];
305
			}
306
307
			if (!isset(self::$tz_cache[$event['tzid']]))
308
			{
309
				self::$tz_cache[$event['tzid']] = calendar_timezones::DateTimeZone($event['tzid']);
310
			}
311
312
			if ($this->so->isWholeDay($event)) $event['whole_day'] = true;
313

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

@@ 2397-2400 (lines=4) @@
2394
			{
2395
				$egwEvent['tzid'] = egw_time::$server_timezone->getName();
2396
			}
2397
			if (!isset(self::$tz_cache[$egwEvent['tzid']]))
2398
			{
2399
				self::$tz_cache[$egwEvent['tzid']] = calendar_timezones::DateTimeZone($egwEvent['tzid']);
2400
			}
2401
			if (!$event['tzid'])
2402
			{
2403
				$event['tzid'] = egw_time::$server_timezone->getName();
@@ 2405-2408 (lines=4) @@
2402
			{
2403
				$event['tzid'] = egw_time::$server_timezone->getName();
2404
			}
2405
			if (!isset(self::$tz_cache[$event['tzid']]))
2406
			{
2407
				self::$tz_cache[$event['tzid']] = calendar_timezones::DateTimeZone($event['tzid']);
2408
			}
2409
2410
			if (!empty($event['uid']))
2411
			{