fixed schema check
This commit is contained in:
parent
14d8fa584d
commit
2c1c8b9bf7
|
@ -109,7 +109,7 @@ class dhcp_settings extends baseModule {
|
||||||
// module dependencies
|
// module dependencies
|
||||||
$return['dependencies'] = array('depends' => array(), 'conflicts' => array());
|
$return['dependencies'] = array('depends' => array(), 'conflicts' => array());
|
||||||
// managed object classes
|
// managed object classes
|
||||||
$return['objectClasses'] = array('top', 'dhcpOptions');
|
$return['objectClasses'] = array('top', 'dhcpOptions', 'dhcpSubnet');
|
||||||
// managed attributes
|
// managed attributes
|
||||||
$return['attributes'] = array('cn', 'dhcpOption', 'dhcpComments', 'dhcpNetMask', 'dhcpStatements');
|
$return['attributes'] = array('cn', 'dhcpOption', 'dhcpComments', 'dhcpNetMask', 'dhcpStatements');
|
||||||
// help Entries
|
// help Entries
|
||||||
|
@ -332,14 +332,13 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I
|
||||||
* lamdaemon are lamdaemon commands to modify homedir, quotas, ...
|
* lamdaemon are lamdaemon commands to modify homedir, quotas, ...
|
||||||
*/
|
*/
|
||||||
public function save_attributes() {
|
public function save_attributes() {
|
||||||
if ($this->getAccountContainer()->dn_orig!=$_SESSION['config']->get_suffix('dhcp')) {
|
// remove dhcpSubnet object class if only the DHCP settings were changed
|
||||||
// add object class
|
if ($this->getAccountContainer()->dn_orig == $_SESSION['config']->get_suffix('dhcp')) {
|
||||||
if (!in_array_ignore_case("dhcpSubnet", $this->attributes['objectClass'])) {
|
if (!in_array_ignore_case("dhcpSubnet", $this->orig['objectClass']) && in_array_ignore_case("dhcpSubnet", $this->attributes['objectClass'])) {
|
||||||
$this->attributes['objectClass'][] = "dhcpSubnet";
|
$this->attributes['objectClass'] = array_delete(array("dhcpSubnet"), $this->attributes['objectClass']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$return = $this->getAccountContainer()->save_module_attributes($this->attributes, $this->orig);
|
$return = parent::save_attributes();
|
||||||
// Return attributes
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue