Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 403-414 (lines=12) @@
400
				if ($no_enum_groups) continue;
401
402
				$members = $GLOBALS['egw']->accounts->member($user);
403
				if (is_array($members))
404
				{
405
					foreach($members as $member)
406
					{
407
						// use only members which gave the user a read-grant
408
						if (!in_array($member['account_id'],$users) &&
409
							($ignore_acl || $this->check_perms(EGW_ACL_READ|($use_freebusy?EGW_ACL_FREEBUSY:0),0,$member['account_id'])))
410
						{
411
							$users[] = $member['account_id'];
412
						}
413
					}
414
				}
415
			}
416
			else	// for users we have to include all the memberships, to get the group-events
417
			{

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

@@ 2276-2287 (lines=12) @@
2273
			if ($GLOBALS['egw']->accounts->get_type($user) == 'g')
2274
			{
2275
				$members = $GLOBALS['egw']->accounts->member($user);
2276
				if (is_array($members))
2277
				{
2278
					foreach($members as $member)
2279
					{
2280
						// use only members which gave the user a read-grant
2281
						if (!in_array($member['account_id'],$users) &&
2282
								$this->check_perms(EGW_ACL_READ|EGW_ACL_FREEBUSY,0,$member['account_id']))
2283
						{
2284
							$users[] = $member['account_id'];
2285
						}
2286
					}
2287
				}
2288
			}
2289
			else	// for users we have to include all the memberships, to get the group-events
2290
			{