diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc
index 37553c2ab71616d248b226bc2a1b6303ea2a6f90..62d6f6890ad2869ddc9922669a66e36c3a4ba5fd 100644 (file)
{
/* Call parent execute */
$smarty= get_smarty();
- $smarty->assign("autonetACL",$this->acl_is_writeable("macAddress").$this->acl_is_writeable("ipHostNumber"));
+ $smarty->assign("autonetACL",$this->acl_is_writeable("macAddress") && $this->acl_is_writeable("ipHostNumber")?"rw":"");
$tmp = $this->plInfo();
foreach($tmp['plProvidedAcls'] as $name => $translation){
$smarty->assign("changeStateForRecords",$changeStateForRecords);
$smarty->assign("staticAddress","<font class=\"must\">*</font>");
- $smarty->assign("autonetACL",$this->acl_is_writeable("macAddress").$this->acl_is_writeable("ipHostNumber"));
+ $smarty->assign("autonetACL",$this->acl_is_writeable("macAddress") && $this->acl_is_writeable("ipHostNumber")?"rw":"");
$display.= $smarty->fetch(get_template_path('network.tpl', TRUE));
}
}
/* Do not add the objectClass ipHost if no ip address is given */
- if(!$this->attrs['ipHostNumber']){
+ if(!isset($this->attrs['ipHostNumber'])){
$this->attrs['objectClass'] = array_remove_entries(array("ipHost"),$this->attrs['objectClass']);
}
"(objectClass=gotoPrinter)".
"(objectClass=ipHost)";
$list = array();
- $ldap->search("(&(|{$ocs})(ipHostNumber={$net}*))",array("ipHostNumber"));
+ $ldap->search("(&(|{$ocs})(ipHostNumber=*))",array("ipHostNumber"));
while($attrs = $ldap->fetch()){
- $list[] = $attrs['ipHostNumber'][0];
+ if (preg_match("/^$net\./", $attrs['ipHostNumber'][0])) {
+ $list[] = $attrs['ipHostNumber'][0];
+ }
}
// Set starting ip.