fixed DDNS check

This commit is contained in:
Roland Gruber 2009-04-05 19:21:00 +00:00
parent b07a861caa
commit 767416cc3e
1 changed files with 10 additions and 8 deletions

View File

@ -187,15 +187,17 @@ class ddns extends baseModule {
$ldap = $_SESSION['ldap']->server();
$dn = $_SESSION['config']->get_suffix('dhcp');
$search = ldap_search($ldap,$dn,"dhcpStatements=ddns-update-style interim");
$info = ldap_get_entries($ldap,$search);
if ($info['count'] == 0) {
return false;
}
else {
return true;
$search = @ldap_search($ldap,$dn,"dhcpStatements=ddns-update-style interim");
if ($search) {
$info = @ldap_get_entries($ldap,$search);
if ($info && ($info['count'] > 0)) {
return true;
}
else {
return false;
}
}
return false;
}
/**