diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-08-22 10:29:15 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-08-22 12:44:46 +0200 |
commit | 2b8a2e16eddcd04bd47e2bc93ac691deee5ee762 (patch) | |
tree | 80e609f5566fb540acf4f5170972df431a5b71b0 /apps/user_ldap/group_ldap.php | |
parent | ac9fd79329ac695fdeba0f102647edb1320f3ea5 (diff) | |
download | nextcloud-server-2b8a2e16eddcd04bd47e2bc93ac691deee5ee762.tar.gz nextcloud-server-2b8a2e16eddcd04bd47e2bc93ac691deee5ee762.zip |
LDAP: don't pass -1 as length to array slice, when no limit is given. It cuts off the last item.
Diffstat (limited to 'apps/user_ldap/group_ldap.php')
-rw-r--r-- | apps/user_ldap/group_ldap.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php index 709144539e9..b29ebe30c51 100644 --- a/apps/user_ldap/group_ldap.php +++ b/apps/user_ldap/group_ldap.php @@ -143,6 +143,9 @@ class GROUP_LDAP extends lib\Access implements \OCP\GroupInterface { if(!empty($this->groupSearch)) { $groupUsers = array_filter($groupUsers, array($this, 'groupMatchesFilter')); } + if($limit = -1) { + $limit = null; + } return array_slice($groupUsers, $offset, $limit); } @@ -184,6 +187,9 @@ class GROUP_LDAP extends lib\Access implements \OCP\GroupInterface { if(!empty($this->groupSearch)) { $groupUsers = array_filter($groupUsers, array($this, 'groupMatchesFilter')); } + if($limit = -1) { + $limit = null; + } return array_slice($groupUsers, $offset, $limit); } @@ -210,6 +216,9 @@ class GROUP_LDAP extends lib\Access implements \OCP\GroupInterface { if(!empty($this->groupSearch)) { $ldap_groups = array_filter($ldap_groups, array($this, 'groupMatchesFilter')); } + if($limit = -1) { + $limit = null; + } return array_slice($ldap_groups, $offset, $limit); } |