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

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