fixed DDNS check
This commit is contained in:
parent
b07a861caa
commit
767416cc3e
|
@ -187,15 +187,17 @@ class ddns extends baseModule {
|
||||||
$ldap = $_SESSION['ldap']->server();
|
$ldap = $_SESSION['ldap']->server();
|
||||||
$dn = $_SESSION['config']->get_suffix('dhcp');
|
$dn = $_SESSION['config']->get_suffix('dhcp');
|
||||||
|
|
||||||
$search = ldap_search($ldap,$dn,"dhcpStatements=ddns-update-style interim");
|
$search = @ldap_search($ldap,$dn,"dhcpStatements=ddns-update-style interim");
|
||||||
$info = ldap_get_entries($ldap,$search);
|
if ($search) {
|
||||||
|
$info = @ldap_get_entries($ldap,$search);
|
||||||
if ($info['count'] == 0) {
|
if ($info && ($info['count'] > 0)) {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return true;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue