]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove useless getReadArgs/setReadArgs methods from PagedResults
authorCôme Chilliet <come.chilliet@nextcloud.com>
Thu, 1 Sep 2022 13:09:00 +0000 (15:09 +0200)
committerCôme Chilliet <come.chilliet@nextcloud.com>
Thu, 20 Oct 2022 10:56:15 +0000 (12:56 +0200)
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
apps/user_ldap/lib/LDAP.php
apps/user_ldap/lib/PagedResults/IAdapter.php
apps/user_ldap/lib/PagedResults/Php73.php

index 28664b2dda6c8dc7a0c756ab79f3e82f84b93fe0..028674e40cc7d9b0395e700e8ef37cef95ffd6a1 100644 (file)
@@ -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);
        }
 
        /**
index 504dd7eaa9d9c783236c3c79dc3a82cdd9f9326d..1627dcc1b2960f51356e1c597f9f381182a4799d 100644 (file)
@@ -81,19 +81,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
         *
index c9d122799375ba4aecd1efbe3780d68d6e4a4e34..bde2d9bcd832c56c991f658fdc40b744dc81cc68 100644 (file)
@@ -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;