fix PHP Warning: Use of undefined constant OPENLDAP_LDAPSERVER

This commit is contained in:
Ralf Becker 2018-09-12 17:06:31 +02:00
parent a137e13ea4
commit 1a1c2f0aff

View File

@ -8,7 +8,6 @@
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package api * @package api
* @subpackage ldap * @subpackage ldap
* @version $Id$
*/ */
namespace EGroupware\Api\Ldap; namespace EGroupware\Api\Ldap;
@ -188,17 +187,17 @@ class ServerInfo
switch($info[0]['structuralobjectclass'][0]) switch($info[0]['structuralobjectclass'][0])
{ {
case 'OpenLDAProotDSE': case 'OpenLDAProotDSE':
$ldapServerType = OPENLDAP_LDAPSERVER; $ldapServerType = self::OPENLDAP;
break; break;
default: default:
$ldapServerType = UNKNOWN_LDAPSERVER; $ldapServerType = self::UNKNOWN;
break; break;
} }
$ldapServerInfo->setServerType($ldapServerType); $ldapServerInfo->setServerType($ldapServerType);
} }
if ($info[0]['vendorname'] && stripos($info[0]['vendorname'][0], 'samba') !== false) if ($info[0]['vendorname'] && stripos($info[0]['vendorname'][0], 'samba') !== false)
{ {
$ldapServerInfo->setServerType(SAMBA4_LDAPSERVER); $ldapServerInfo->setServerType(self::SAMBA4);
} }
// check for subschema entry dn // check for subschema entry dn