simplified search of fixed IPs
This commit is contained in:
parent
07434670d7
commit
7088240b45
|
@ -3,8 +3,8 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2008 Thomas Manninger
|
Copyright (C) 2008 Thomas Manninger
|
||||||
2009 Roland Gruber
|
2009 - 2010 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -138,9 +138,7 @@ class lamDHCPList extends lamList {
|
||||||
if ($attribute=="fixed_ips") {
|
if ($attribute=="fixed_ips") {
|
||||||
// find all fixed addresses:
|
// find all fixed addresses:
|
||||||
$ldap = $_SESSION['ldap'];
|
$ldap = $_SESSION['ldap'];
|
||||||
$suffix = $_SESSION['config']->get_Suffix('dhcp');
|
$sr = @ldap_search($ldap->server(),$entry['dn'],"objectClass=dhcpHost", array('dhcpstatements', 'dhcphwaddress', 'cn'), 0, 0, 0, LDAP_DEREF_NEVER);
|
||||||
|
|
||||||
$sr = @ldap_search($ldap->server(),"cn=".$entry['cn'][0].",".$suffix,"objectClass=dhcpHost", array(), 0, 0, 0, LDAP_DEREF_NEVER);
|
|
||||||
if ($sr) {
|
if ($sr) {
|
||||||
$get = ldap_get_entries($ldap->server(),$sr);
|
$get = ldap_get_entries($ldap->server(),$sr);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue