diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-09-08 12:06:08 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-10-20 12:56:16 +0200 |
commit | 14804d9677b6e927c3f19fb875d61a59101acb29 (patch) | |
tree | 93405713a99da7bbb25eed1e68da2aad043b1fee /apps/user_ldap | |
parent | d10dfa84db9e3871685d75873312fe9a321d9071 (diff) | |
download | nextcloud-server-14804d9677b6e927c3f19fb875d61a59101acb29.tar.gz nextcloud-server-14804d9677b6e927c3f19fb875d61a59101acb29.zip |
Renamed ambiguous $limit parameter to pageSize
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/Access.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 9966f94b30f..3e649ecff30 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -1080,7 +1080,7 @@ class Access extends LDAPUtility { string $filter, string $base, ?array &$attr, - ?int $limit, + ?int $pageSize, ?int $offset ) { // See if we have a resource, in case not cancel with message @@ -1094,7 +1094,7 @@ class Access extends LDAPUtility { //check whether paged search should be attempted try { - $pagedSearchOK = $this->initPagedSearch($filter, $base, $attr, (int)$limit, (int)$offset); + $pagedSearchOK = $this->initPagedSearch($filter, $base, $attr, (int)$pageSize, (int)$offset); } catch (NoMoreResults $e) { // beyond last results page return false; @@ -1945,19 +1945,19 @@ class Access extends LDAPUtility { string $filter, string $base, ?array $attr, - int $limit, + int $pageSize, int $offset ): bool { $pagedSearchOK = false; - if ($limit !== 0) { + if ($pageSize !== 0) { $this->logger->debug( - 'initializing paged search for filter {filter}, base {base}, attr {attr}, limit {limit}, offset {offset}', + 'initializing paged search for filter {filter}, base {base}, attr {attr}, pageSize {pageSize}, offset {offset}', [ 'app' => 'user_ldap', 'filter' => $filter, 'base' => $base, 'attr' => $attr, - 'limit' => $limit, + 'pageSize' => $pageSize, 'offset' => $offset ] ); @@ -1966,8 +1966,8 @@ class Access extends LDAPUtility { // no cookie known from a potential previous search. We need // to start from 0 to come to the desired page. cookie value // of '0' is valid, because 389ds - $reOffset = ($offset - $limit) < 0 ? 0 : $offset - $limit; - $this->search($filter, $base, $attr, $limit, $reOffset, true); + $reOffset = ($offset - $pageSize) < 0 ? 0 : $offset - $pageSize; + $this->search($filter, $base, $attr, $pageSize, $reOffset, true); if (!$this->hasMoreResults()) { // when the cookie is reset with != 0 offset, there are no further // results, so stop. @@ -1979,7 +1979,7 @@ class Access extends LDAPUtility { $this->abandonPagedSearch(); } $pagedSearchOK = true; - $this->invokeLDAPMethod('controlPagedResult', $limit, false, $this->lastCookie); + $this->invokeLDAPMethod('controlPagedResult', $pageSize, false, $this->lastCookie); $this->logger->debug('Ready for a paged search', ['app' => 'user_ldap']); /* ++ Fixing RHDS searches with pages with zero results ++ * We couldn't get paged searches working with our RHDS for login ($limit = 0), |