diff options
author | Alexander Bergolth <leo@strike.wu.ac.at> | 2014-03-13 09:33:07 +0100 |
---|---|---|
committer | Alexander Bergolth <leo@strike.wu.ac.at> | 2014-03-13 09:33:07 +0100 |
commit | 7f8b04d3e0392849de42a2b834bc1213d4c6149f (patch) | |
tree | a4f83ace1b870be8c5c7bdf2d31d2df2f38317de /apps/user_ldap/group_ldap.php | |
parent | 84550fbfb472f31914fc155c4e9228f4c8ba6052 (diff) | |
download | nextcloud-server-7f8b04d3e0392849de42a2b834bc1213d4c6149f.tar.gz nextcloud-server-7f8b04d3e0392849de42a2b834bc1213d4c6149f.zip |
adapt coding style
Diffstat (limited to 'apps/user_ldap/group_ldap.php')
-rw-r--r-- | apps/user_ldap/group_ldap.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php index 064631d789d..cb6d256e5cc 100644 --- a/apps/user_ldap/group_ldap.php +++ b/apps/user_ldap/group_ldap.php @@ -352,28 +352,28 @@ 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) + $maxGroups = 100000; // limit max results (just for safety reasons) if ($limit > -1) { - $overall_limit = min($limit, $max_groups); + $overallLimit = min($limit, $maxGroups); } else { - $overall_limit = $max_groups; - } - $chunk_offset = $offset; - $all_groups = array(); - while ($chunk_offset < $overall_limit) { - $chunk_limit = min($pagingsize, $overall_limit - $chunk_offset); - $ldap_groups = $this->getGroupsChunk($search, $chunk_limit, $chunk_offset); - $nread = count($ldap_groups); - \OCP\Util::writeLog('user_ldap', 'getAllGroups('.$search.'): read '.$nread.' at offset '.$chunk_offset.' (limit: '.$chunk_limit.')', \OCP\Util::DEBUG); + $overallLimit = $maxGroups; + } + $chunkOffset = $offset; + $allGroups = array(); + while ($chunkOffset < $overallLimit) { + $chunkLimit = min($pagingsize, $overallLimit - $chunkOffset); + $ldapGroups = $this->getGroupsChunk($search, $chunkLimit, $chunkOffset); + $nread = count($ldapGroups); + \OCP\Util::writeLog('user_ldap', 'getGroups('.$search.'): read '.$nread.' at offset '.$chunkOffset.' (limit: '.$chunkLimit.')', \OCP\Util::DEBUG); if ($nread) { - $all_groups = array_merge($all_groups, $ldap_groups); - $chunk_offset += $nread; + $allGroups = array_merge($allGroups, $ldapGroups); + $chunkOffset += $nread; } - if ($nread < $chunk_limit) { + if ($nread < $chunkLimit) { break; } } - return $all_groups; + return $allGroups; } public function groupMatchesFilter($group) { |