Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 525-538 (lines=14) @@
522
					}
523
				}
524
			}
525
			else	// for users we have to include all the memberships, to get the group-events
526
			{
527
				$memberships = $GLOBALS['egw']->accounts->memberships($user, true);
528
				if (is_array($memberships))
529
				{
530
					foreach($memberships as $group)
531
					{
532
						if (!in_array($group,$users))
533
						{
534
							$users[] = $group;
535
						}
536
					}
537
				}
538
			}
539
		}
540
		return $users;
541
	}

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

@@ 2217-2230 (lines=14) @@
2214
					}
2215
				}
2216
			}
2217
			else	// for users we have to include all the memberships, to get the group-events
2218
			{
2219
				$memberships = $GLOBALS['egw']->accounts->memberships($user, true);
2220
				if (is_array($memberships))
2221
				{
2222
					foreach($memberships as $group)
2223
					{
2224
						if (!in_array($group, $users))
2225
						{
2226
							$users[] = $group;
2227
						}
2228
					}
2229
				}
2230
			}
2231
		}
2232
2233
		if ($filter != 'master' && ($filter != 'exact' || empty($event['uid'])))