Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>tags/v26.0.0beta1
@@ -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); | |||
} | |||
/** |
@@ -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 | |||
* |
@@ -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; |