summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-09-18 17:12:35 +0200
committerArthur Schiwon <blizzz@owncloud.com>2014-10-20 12:51:38 +0200
commite46f87fdacb8273675311a8538fc4b47fdb0ac13 (patch)
treeae770714eab7faa8d41dda09652f3634d476d1ad /lib/private
parent6fc04c2f9129fc55966ad66d2ddca1b7d884f4e9 (diff)
downloadnextcloud-server-e46f87fdacb8273675311a8538fc4b47fdb0ac13.tar.gz
nextcloud-server-e46f87fdacb8273675311a8538fc4b47fdb0ac13.zip
backport of #11494
fix retrievel of group members and cache group members fix changed variable name with several backends, more than limit can be returned make performance less bad. Still far from good, but at least it works add one simple cache test adjust group manager tests Conflicts: apps/user_ldap/group_ldap.php apps/user_ldap/lib/access.php apps/user_ldap/tests/group_ldap.php
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/group/manager.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php
index 2a2fa5a67f7..54348c8f122 100644
--- a/lib/private/group/manager.php
+++ b/lib/private/group/manager.php
@@ -179,10 +179,9 @@ class Manager extends PublicEmitter {
if(!empty($search)) {
// only user backends have the capability to do a complex search for users
$searchOffset = 0;
+ $searchLimit = $limit * 100;
if($limit === -1) {
- $searchLimit = $group->count('');
- } else {
- $searchLimit = $limit * 2;
+ $searchLimit = 500;
}
do {
@@ -193,7 +192,7 @@ class Manager extends PublicEmitter {
}
}
$searchOffset += $searchLimit;
- } while(count($groupUsers) < $searchLimit+$offset && count($filteredUsers) === $searchLimit);
+ } while(count($groupUsers) < $searchLimit+$offset && count($filteredUsers) >= $searchLimit);
if($limit === -1) {
$groupUsers = array_slice($groupUsers, $offset);