Code Duplication    Length = 18-18 lines in 2 locations

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

@@ 1211-1228 (lines=18) @@
1208
						$this->tzid = $deviceInfo['tzid'];
1209
				}
1210
			}
1211
			if (isset($GLOBALS['egw_info']['user']['preferences']['syncml']['calendar_owner']))
1212
			{
1213
				$owner = $GLOBALS['egw_info']['user']['preferences']['syncml']['calendar_owner'];
1214
				switch ($owner)
1215
				{
1216
					case 'G':
1217
					case 'P':
1218
					case 0:
1219
					case -1:
1220
						$owner = $this->user;
1221
						break;
1222
					default:
1223
						if ((int)$owner && $this->check_perms(EGW_ACL_EDIT, 0, $owner))
1224
						{
1225
							$this->calendarOwner = $owner;
1226
						}
1227
				}
1228
			}
1229
		}
1230
		// store product name and software version for futher usage
1231
		if ($_productName)

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

@@ 2012-2029 (lines=18) @@
2009
				$this->tzid = false;
2010
			}
2011
2012
			if (isset($GLOBALS['egw_info']['user']['preferences']['syncml']['calendar_owner']))
2013
			{
2014
				$owner = $GLOBALS['egw_info']['user']['preferences']['syncml']['calendar_owner'];
2015
				switch ($owner)
2016
				{
2017
					case 'G':
2018
					case 'P':
2019
					case 0:
2020
					case -1:
2021
						$owner = $this->user;
2022
						break;
2023
					default:
2024
						if ((int)$owner && $this->check_perms(EGW_ACL_EDIT, 0, $owner))
2025
						{
2026
							$this->calendarOwner = $owner;
2027
						}
2028
				}
2029
			}
2030
			if (!isset($this->productManufacturer) ||
2031
				 $this->productManufacturer == '' ||
2032
				 $this->productManufacturer == 'file')