diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-09-01 15:09:00 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-10-20 12:56:15 +0200 |
commit | d6e49cd2de200875f255a466b8891bd92ad1b777 (patch) | |
tree | 8b1352447983574a0b09f8b837f6222b52bdfc1a | |
parent | d790d45567d81b97fdee87e154bd230b03a1a20a (diff) | |
download | nextcloud-server-d6e49cd2de200875f255a466b8891bd92ad1b777.tar.gz nextcloud-server-d6e49cd2de200875f255a466b8891bd92ad1b777.zip |
Remove useless getReadArgs/setReadArgs methods from PagedResults
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | apps/user_ldap/lib/LDAP.php | 3 | ||||
-rw-r--r-- | apps/user_ldap/lib/PagedResults/IAdapter.php | 13 | ||||
-rw-r--r-- | apps/user_ldap/lib/PagedResults/Php73.php | 16 |
3 files changed, 1 insertions, 31 deletions
diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php index 28664b2dda6..028674e40cc 100644 --- a/apps/user_ldap/lib/LDAP.php +++ b/apps/user_ldap/lib/LDAP.php @@ -180,8 +180,7 @@ class LDAP implements ILDAPWrapper { * {@inheritDoc} */ public function read($link, $baseDN, $filter, $attr) { - $this->pagedResultsAdapter->setReadArgs($link, $baseDN, $filter, $attr); - return $this->invokeLDAPMethod('read', ...$this->pagedResultsAdapter->getReadArgs($link)); + return $this->invokeLDAPMethod('read', $link, $baseDN, $filter, $attr, 0, -1); } /** diff --git a/apps/user_ldap/lib/PagedResults/IAdapter.php b/apps/user_ldap/lib/PagedResults/IAdapter.php index 504dd7eaa9d..1627dcc1b29 100644 --- a/apps/user_ldap/lib/PagedResults/IAdapter.php +++ b/apps/user_ldap/lib/PagedResults/IAdapter.php @@ -82,19 +82,6 @@ interface IAdapter { public function getSearchArgs($link): array; /** - * The adapter receives the parameters that were passed to a read - * operation. Typically it wants to save the them for the call proper later - * on. - */ - public function setReadArgs($link, string $baseDN, string $filter, array $attr): void; - - /** - * The adapter shall report which arguments shall be passed to the - * ldap_read function. - */ - public function getReadArgs($link): array; - - /** * Returns the current paged results cookie * * @param resource|\LDAP\Connection $link LDAP resource diff --git a/apps/user_ldap/lib/PagedResults/Php73.php b/apps/user_ldap/lib/PagedResults/Php73.php index c9d12279937..bde2d9bcd83 100644 --- a/apps/user_ldap/lib/PagedResults/Php73.php +++ b/apps/user_ldap/lib/PagedResults/Php73.php @@ -123,22 +123,6 @@ class Php73 implements IAdapter { return $this->linkData[$linkId]['searchArgs']; } - public function setReadArgs($link, string $baseDN, string $filter, array $attr): void { - $linkId = $this->getLinkId($link); - if (!isset($this->linkData[$linkId])) { - $this->linkData[$linkId] = []; - } - - $this->linkData[$linkId]['readArgs'] = func_get_args(); - $this->linkData[$linkId]['readArgs'][] = 0; // $attrsonly default - $this->linkData[$linkId]['readArgs'][] = -1; // $sizelimit default - } - - public function getReadArgs($link): array { - $linkId = $this->getLinkId($link); - return $this->linkData[$linkId]['readArgs']; - } - protected function preparePagesResultsArgs(int $linkId, string $methodKey): void { if (!isset($this->linkData[$linkId]['requestArgs'])) { return; |