Code Duplication    Length = 4-5 lines in 3 locations

api/src/Link.php 1 location

@@ 243-247 (lines=5) @@
240
			}
241
		}
242
		// disable ability to link to accounts for non-admins, if account-selection is disabled
243
		if ($GLOBALS['egw_info']['user']['preferences']['common']['account_selection'] == 'none' &&
244
			!isset($GLOBALS['egw_info']['user']['apps']['admin']))
245
		{
246
			unset(self::$app_register['api-accounts']);
247
		}
248
		if (!(self::$title_cache = Cache::getSession(__CLASS__, 'link_title_cache')))
249
		{
250
			self::$title_cache = array();

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

@@ 573-577 (lines=5) @@
570
571
		// store event, ignore conflicts and skip notifications, as AS clients do their own notifications
572
		$skip_notification = false;
573
		if (isset($GLOBALS['egw_info']['user']['preferences']['activesync']['mail-allowSendingInvitations']) &&
574
			$GLOBALS['egw_info']['user']['preferences']['activesync']['mail-allowSendingInvitations']=='send')
575
		{
576
			$skip_notification = true; // to avoid double notification from client AND Server
577
		}
578
		$messages = null;
579
		if (!($id = $this->calendar->update($event, true, true, false, true, $messages, $skip_notification)))
580
		{

mail/inc/class.mail_zpush.inc.php 1 location

@@ 1372-1375 (lines=4) @@
1369
		else
1370
		{
1371
			$maximumSyncRangeInDays = self::PAST_LIMIT; // corresponds to our default value
1372
			if (isset($GLOBALS['egw_info']['user']['preferences']['activesync']['mail-maximumSyncRange']))
1373
			{
1374
				$maximumSyncRangeInDays = $GLOBALS['egw_info']['user']['preferences']['activesync']['mail-maximumSyncRange'];
1375
			}
1376
			$cutoffdate = (is_numeric($maximumSyncRangeInDays) ? Api\DateTime::to('now','ts')-(3600*24*$maximumSyncRangeInDays):null);
1377
			if (is_numeric($maximumSyncRangeInDays)) ZLog::Write(LOGLEVEL_DEBUG,__METHOD__.' Client set no truncationdate. Using '.$maximumSyncRangeInDays.' days.'.date("d-M-Y", $cutoffdate));
1378
		}