Merge pull request #23527 from owncloud/fix-21136

disable Paged Search when chunksize is set to 0, fixes #21136
This commit is contained in:
C. Montero Luque 2016-04-14 11:14:19 -04:00
commit 5911ce530b
2 changed files with 6 additions and 2 deletions

View File

@ -28,6 +28,9 @@
namespace OCA\user_ldap\lib; namespace OCA\user_ldap\lib;
/**
* @property int ldapPagingSize holds an integer
*/
class Configuration { class Configuration {
protected $configPrefix = null; protected $configPrefix = null;

View File

@ -85,11 +85,12 @@ class Connection extends LDAPUtility {
if($memcache->isAvailable()) { if($memcache->isAvailable()) {
$this->cache = $memcache->create(); $this->cache = $memcache->create();
} }
$this->hasPagedResultSupport =
$this->ldap->hasPagedResultSupport();
$helper = new Helper(); $helper = new Helper();
$this->doNotValidate = !in_array($this->configPrefix, $this->doNotValidate = !in_array($this->configPrefix,
$helper->getServerConfigurationPrefixes()); $helper->getServerConfigurationPrefixes());
$this->hasPagedResultSupport =
intval($this->configuration->ldapPagingSize) !== 0
|| $this->ldap->hasPagedResultSupport();
} }
public function __destruct() { public function __destruct() {