Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 383-393 (lines=11) @@
380
		foreach($_users as $user)
381
		{
382
			$user = trim($user);
383
			if ($ignore_acl || $this->check_perms(EGW_ACL_READ|EGW_ACL_READ_FOR_PARTICIPANTS|($use_freebusy?EGW_ACL_FREEBUSY:0),0,$user))
384
			{
385
				if ($user && !in_array($user,$users))	// already added?
386
				{
387
					$users[] = $user;
388
				}
389
			}
390
			elseif ($GLOBALS['egw']->accounts->get_type($user) != 'g')
391
			{
392
				continue;	// for non-groups (eg. users), we stop here if we have no read-rights
393
			}
394
			// the further code is only for real users
395
			if (!is_numeric($user)) continue;
396

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

@@ 2258-2268 (lines=11) @@
2255
		foreach(array_keys($this->grants) as $user)
2256
		{
2257
			$user = trim($user);
2258
			if ($this->check_perms(EGW_ACL_READ|EGW_ACL_READ_FOR_PARTICIPANTS|EGW_ACL_FREEBUSY,0,$user))
2259
			{
2260
				if ($user && !in_array($user,$users))	// already added?
2261
				{
2262
					$users[] = $user;
2263
				}
2264
			}
2265
			elseif ($GLOBALS['egw']->accounts->get_type($user) != 'g')
2266
			{
2267
				continue;	// for non-groups (eg. users), we stop here if we have no read-rights
2268
			}
2269
			// the further code is only for real users
2270
			if (!is_numeric($user)) continue;
2271