diff options
author | root <leo@strike.wu.ac.at> | 2014-03-04 21:12:47 +0100 |
---|---|---|
committer | root <leo@strike.wu.ac.at> | 2014-03-04 21:12:47 +0100 |
commit | 4645d0a93a1dbf5c89b78d226d069de0dff13167 (patch) | |
tree | 5f80ed42fe9e08088b1bdd96eeec6a90098b4edb /apps | |
parent | eb1e36182470b5aa71b4ecd2253479e81c388898 (diff) | |
download | nextcloud-server-4645d0a93a1dbf5c89b78d226d069de0dff13167.tar.gz nextcloud-server-4645d0a93a1dbf5c89b78d226d069de0dff13167.zip |
getGroups(): fix overall max search limit for paged searches
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/group_ldap.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php index 861636a763f..7efbc025ba8 100644 --- a/apps/user_ldap/group_ldap.php +++ b/apps/user_ldap/group_ldap.php @@ -344,7 +344,6 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface { * (active directory has a limit of 1000 by default) */ public function getGroups($search = '', $limit = -1, $offset = 0) { - $max_groups = 100000; // limit max results (just for safety reasons) if(!$this->enabled) { return array(); } @@ -353,10 +352,11 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface { || empty($pagingsize)) { return $this->getGroupsChunk($search, $limit, $offset); } + $max_groups = 100000; // limit max results (just for safety reasons) if ($limit > -1) { - $overall_limit = min($limit, 100000); + $overall_limit = min($limit, $max_groups); } else { - $overall_limit = 100000; + $overall_limit = $max_groups; } $chunk_offset = $offset; $all_groups = array(); |