[Pkg-owncloud-commits] [owncloud] 03/34: remove duplicate call to groupExists
David Prévot
taffit at moszumanska.debian.org
Thu Nov 13 19:37:11 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v6.0.6
in repository owncloud.
commit ed6588ff21e99dceb40173ff1e7318bff62f16e5
Author: Robin Appelman <icewind at owncloud.com>
Date: Fri Feb 14 14:25:45 2014 +0100
remove duplicate call to groupExists
---
lib/private/group/manager.php | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php
index f275c0d..f69ee63 100644
--- a/lib/private/group/manager.php
+++ b/lib/private/group/manager.php
@@ -76,12 +76,7 @@ class Manager extends PublicEmitter {
if (isset($this->cachedGroups[$gid])) {
return $this->cachedGroups[$gid];
}
- foreach ($this->backends as $backend) {
- if ($backend->groupExists($gid)) {
- return $this->getGroupObject($gid);
- }
- }
- return null;
+ return $this->getGroupObject($gid);
}
protected function getGroupObject($gid) {
@@ -91,6 +86,9 @@ class Manager extends PublicEmitter {
$backends[] = $backend;
}
}
+ if (count($backends) === 0) {
+ return null;
+ }
$this->cachedGroups[$gid] = new Group($gid, $backends, $this->userManager, $this);
return $this->cachedGroups[$gid];
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list