LSaddon::samba: fix PHP warning about LS_SAMBA_UNIX_ID_POOL_DN contant

This commit is contained in:
Benjamin Renard 2020-12-02 19:49:37 +01:00
parent a7ab192274
commit 1da0693138

View file

@ -287,7 +287,7 @@ function generate_sambaPrimaryGroupSID($ldapObject) {
* @retval integer UNIX ID value on succes, false otherwise * @retval integer UNIX ID value on succes, false otherwise
*/ */
function get_samba_unix_pool_next_id($attr) { function get_samba_unix_pool_next_id($attr) {
$unix_id_pool_dn = (constant('LS_SAMBA_UNIX_ID_POOL_DN')?LS_SAMBA_UNIX_ID_POOL_DN:LS_SAMBA_DOMAIN_OBJECT_DN); $unix_id_pool_dn = (defined('LS_SAMBA_UNIX_ID_POOL_DN')?constant('LS_SAMBA_UNIX_ID_POOL_DN'):LS_SAMBA_DOMAIN_OBJECT_DN);
$unix_id_pool = LSldap :: getLdapEntry ($unix_id_pool_dn); $unix_id_pool = LSldap :: getLdapEntry ($unix_id_pool_dn);
if ($unix_id_pool === false) { if ($unix_id_pool === false) {
LSerror :: addErrorCode('SAMBA_02'); LSerror :: addErrorCode('SAMBA_02');