Fix invalid function call in getCapabilities caused by refactoring

This commit is contained in:
Matthias Jentsch 2015-07-15 15:34:11 +02:00
parent 930303dfb2
commit 774d6ce94a
2 changed files with 5 additions and 4 deletions

View File

@ -263,14 +263,15 @@ class LdapCapabilities
* Discover the capabilities of the given LDAP server * Discover the capabilities of the given LDAP server
* *
* @param LdapConnection $connection The ldap connection to use * @param LdapConnection $connection The ldap connection to use
* @param int $ds The link identifier of the current LDAP connection
* *
* @return LdapCapabilities * @return LdapCapabilities
* *
* @throws LdapException In case the capability query has failed * @throws LdapException In case the capability query has failed
*/ */
public static function discoverCapabilities(LdapConnection $connection, $ds) public static function discoverCapabilities(LdapConnection $connection)
{ {
$ds = $connection->getConnection();
$fields = array( $fields = array(
'defaultNamingContext', 'defaultNamingContext',
'namingContexts', 'namingContexts',

View File

@ -261,7 +261,7 @@ class LdapConnection implements Selectable, Inspectable
{ {
if ($this->capabilities === null) { if ($this->capabilities === null) {
try { try {
$this->capabilities = $this->discoverCapabilities($this->getConnection()); $this->capabilities = LdapCapabilities::discoverCapabilities($this);
$this->discoverySuccess = true; $this->discoverySuccess = true;
} catch (LdapException $e) { } catch (LdapException $e) {
Logger::debug($e); Logger::debug($e);
@ -1031,7 +1031,7 @@ class LdapConnection implements Selectable, Inspectable
// Try to execute a schema discovery, this may fail if schema discovery is not supported // Try to execute a schema discovery, this may fail if schema discovery is not supported
try { try {
$cap = LdapCapabilities::discoverCapabilities($this, $ds); $cap = LdapCapabilities::discoverCapabilities($this);
$infos []= $cap->getVendor(); $infos []= $cap->getVendor();
$version = $cap->getVersion(); $version = $cap->getVersion();