diff --git a/plugins/admin/systems/class_servDNSeditZoneEntries.inc b/plugins/admin/systems/class_servDNSeditZoneEntries.inc
index f7d983982a8cd58029d95145183506b0428c6b72..152aef84d89f777a32a73cc00590c835cc9c0f42 100644 (file)
$this->Devices[$attrs['relativeDomainName'][0]]['OrigCn'] = $attrs['relativeDomainName'][0];
}
$this->Devices[$attrs['relativeDomainName'][0]]['OrigCn'] = $attrs['relativeDomainName'][0];
}
- if(!count($this->Devices)){
- $this->disableDialog = true;
+ $ldap->cat($this->dn,array("objectClass"));
+
+ $this->disableDialog = true;
+ if(count($this->Devices)|| $ldap->count()){
+ $this->disableDialog = false;
}
}
}
}
$once = false;
$entry = getDNSHostEntries($this->config,"",true);
$entry['exists'] = true;
$once = false;
$entry = getDNSHostEntries($this->config,"",true);
$entry['exists'] = true;
- $entry['zoneName'] = $this->zoneName;
+ $entry['zoneName'] = strtoupper($this->attrs['cn'][0])."/".$this->zoneName;
$entry['RECORDS'][] = array("type" => "aRecord" , "value"=>"");
$entry['RECORDS'][] = array("type" => "aRecord" , "value"=>"");
- $this->Devices[_("New Entry")] = $entry;
+ $this->Devices[_("New entry")] = $entry;
}
if(count($tmp2) != 2) continue;
}
if(count($tmp2) != 2) continue;
$names = array();
foreach($this->Devices as $DevName => $device){
$names = array();
foreach($this->Devices as $DevName => $device){
+ /* Don't need to check empty values ... */
+ if(!count($device['RECORDS'])) continue;
+
/* Checking entry name
*/
if((!is_uid($DevName)) | (empty($DevName))){
/* Checking entry name
*/
if((!is_uid($DevName)) | (empty($DevName))){
/* Names should be written in lowercase
*/
/* Names should be written in lowercase
*/
- if(strtolower($DevName) != $DevName){
- $message[] = sprintf(_("The host name '%s' should be written in lowercase."), $DevName);
- }
+# if(strtolower($DevName) != $DevName){
+# $message[] = sprintf(_("The host name '%s' should be written in lowercase."), $DevName);
+# }
/* Check records
*/
/* Check records
*/
<input type='text' value='".$record['value']."' name='ValueSelection_".$name."' style='width:250px;'>
</td>
<td style='width:50px;text-align:right;'>
<input type='text' value='".$record['value']."' name='ValueSelection_".$name."' style='width:250px;'>
</td>
<td style='width:50px;text-align:right;'>
- <input type='image' name='AddRecord_".$name."' src='images/crossref.png' alt='"._("Add")."' title='"._("Add")."'>
+ <input type='image' name='AddRecord_".$name."' src='images/list_new.png' alt='"._("Add")."' title='"._("Add")."'>
<input type='image' name='RemoveRecord_".$name."' src='images/edittrash.png' alt='"._("Remove")."' title='"._("Remove")."'>
</td>
</tr>";
<input type='image' name='RemoveRecord_".$name."' src='images/edittrash.png' alt='"._("Remove")."' title='"._("Remove")."'>
</td>
</tr>";