summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fd450a2)
raw | patch | inline | side by side (parent: fd450a2)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 14 Mar 2008 07:42:51 +0000 (07:42 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 14 Mar 2008 07:42:51 +0000 (07:42 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9792 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc | patch | blob | history | |
gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZoneEntries.inc | patch | blob | history |
diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc
index 8b90877f9706eb10bb199b89d91f698a59b0a3e8..631306c64e13c4a47a7967dd84edcc74d5d87daf 100644 (file)
/* Check if zoneName is already in use */
$usedZones = $this->getUsedZoneNames();
if(($this->isNew == true)||($this->zoneName != $this->InitialzoneName)||($this->ReverseZone != $this->InitialReverseZone)){
- /* if((isset($usedZones[$this->zoneName]))&&($this->zoneName != $this->InitialzoneName)){
- $message[] =_("This zoneName is already in use");
- }
- if((in_array($this->ReverseZone,$usedZones))&&($this->ReverseZone != $this->InitialReverseZone)){
- $message[] =_("This reverse zone is already in use");
- }*/
- }
if(empty($this->zoneName)){
- $message[] =sprintf(_("The zone name is not valid!"));
+ $message[] = msgPool::required(_("Zone name"));
}
if(empty($this->ReverseZone)){
- $message[] =sprintf(_("The reverse zone is not valid!"));
+ $message[] = msgPool::required(_("Reverse zone"));
}
if($this->zoneName != strtolower($this->zoneName)){
- $message[] = _("Only lowercase characters are allowed in zone names!");
+ $message[] = msgPool::invalid(_("Zone name"),"","",_("Only lowercase allowed"));
}
if(!is_numeric($this->sOAserial)){
- $message[] = sprintf(_("'%s' is not numeric!"), _("Serial"));
+ $message[] = msgPool::invalid(_("Serial"),$this->sOAserial,"/[0-9]/");
}
if(!is_numeric($this->sOArefresh)){
- $message[] = sprintf(_("'%s' is not numeric!"), _("Refresh"));
+ $message[] = msgPool::invalid(_("Refresh"),$this->sOArefresh,"/[0-9]/");
}
if(!is_numeric($this->sOAttl)){
- $message[] = sprintf(_("'%s' is not numeric!"), _("TTL"));
+ $message[] = msgPool::invalid(_("Time to life"),$this->sOAttl,"/[0-9]/");
}
if(!is_numeric($this->sOAexpire)){
- $message[] = sprintf(_("'%s' is not numeric!"), _("Expire"));
+ $message[] = msgPool::invalid(_("Expire"),$this->sOAexpire,"/[0-9]/");
}
if(!is_numeric($this->sOAretry)){
- $message[] = sprintf(_("'%s' is not numeric!"), _("Retry"));
+ $message[] = msgPool::invalid(_("Retry"),$this->sOAretry,"/[0-9]/");
}
foreach($this->Records as $name => $values){
/* only lower-case is allowed in record entries ... */
if($values['value'] != strtolower($values['value'])){
- $message[] = sprintf(_("Only lowercase records are allowed for '%s'!"),$values['type']);
+ $message[] = msgPool::invalid($values['type'],"","",_("Only lowercase allowed"));
}
}
/* Check for valid&complete IP address */
if(!tests::is_ip($addr)){
- $message[] = _("Network address is not valid!");
+ $message[] = msgPool::invalid(_("Network address"));
}
/* Check if given address matches selected network class */
}
}
break;
- default : $message[] =sprintf(_("The network class '%s' is not valid!"),$this->NetworkClass);
+ default : $message[] = msgPool::invalid(_("Network class"),$this->NetworkClass);
}
return ($message);
diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZoneEntries.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZoneEntries.inc
index 922e7af25eaed13c18a329971e7089363ad27d1d..41cbf45c35442424fa8cff589e02d533e39d6cfd 100644 (file)
/* Checking entry name
*/
if(!preg_match("/^[a-z0-9_\.-]+$/i", $DevName) || (empty($DevName))){
- $message[] = _("Entry name contains invalid characters.");
+ $message[] = msgPool::invalid(_("Name"),$DevName,"/[a-z0-9_\.-]/i");
}
/* Renaming check for existing devices
<input type='image' name='RemoveRecord_".$name."' src='images/edittrash.png' alt='"._("Remove")."' title='"._("Remove")."'>
";
-# if($record['type'] == "aRecord"){
-# $str .="<input type='image' name='AddPtr_".$name."' src='images/network.png'
-# alt='"._("Add PTR")."' title='"._("Add PTR record")."'>";
-# }else{
-# $str .= "<img src='images/empty.png' alt=''>";
-# }
-
$str.=
"</td>
</tr>";