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-18 00:17:43 +0200
commit86daab2800aacdbc26dd532f348766cccaad1e51 (patch)
tree059da37a6c36b5496455db4ae48b90abbb22b040 /lib/private
parent174ab07a4beed45b2d3a477723f6b47a37ecc7ce (diff)
downloadnextcloud-server-86daab2800aacdbc26dd532f348766cccaad1e51.tar.gz
nextcloud-server-86daab2800aacdbc26dd532f348766cccaad1e51.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
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 816e7b427f5..417be79ab30 100644
--- a/lib/private/group/manager.php
+++ b/lib/private/group/manager.php
@@ -223,10 +223,9 @@ class Manager extends PublicEmitter implements IGroupManager {
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 {
@@ -237,7 +236,7 @@ class Manager extends PublicEmitter implements IGroupManager {
}
}
$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);