Code Duplication    Length = 14-14 lines in 2 locations

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'])))

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

@@ 542-555 (lines=14) @@
539
					}
540
				}
541
			}
542
			else	// for users we have to include all the memberships, to get the group-events
543
			{
544
				$memberships = $GLOBALS['egw']->accounts->memberships($user, true);
545
				if (is_array($memberships))
546
				{
547
					foreach($memberships as $group)
548
					{
549
						if (!in_array($group,$users))
550
						{
551
							$users[] = $group;
552
						}
553
					}
554
				}
555
			}
556
		}
557
		return $users;
558
	}