Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 416-429 (lines=14) @@
413
					}
414
				}
415
			}
416
			else	// for users we have to include all the memberships, to get the group-events
417
			{
418
				$memberships = $GLOBALS['egw']->accounts->membership($user);
419
				if (is_array($memberships))
420
				{
421
					foreach($memberships as $group)
422
					{
423
						if (!in_array($group['account_id'],$users))
424
						{
425
							$users[] = $group['account_id'];
426
						}
427
					}
428
				}
429
			}
430
		}
431
		return $users;
432
	}

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

@@ 2289-2302 (lines=14) @@
2286
					}
2287
				}
2288
			}
2289
			else	// for users we have to include all the memberships, to get the group-events
2290
			{
2291
				$memberships = $GLOBALS['egw']->accounts->membership($user);
2292
				if (is_array($memberships))
2293
				{
2294
					foreach($memberships as $group)
2295
					{
2296
						if (!in_array($group['account_id'],$users))
2297
						{
2298
							$users[] = $group['account_id'];
2299
						}
2300
					}
2301
				}
2302
			}
2303
		}
2304
2305
		if ($filter != 'master' && ($filter != 'exact' || empty($event['uid'])))