From: hickert Date: Fri, 14 Mar 2008 07:42:51 +0000 (+0000) Subject: msgPool X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3b553554612da025ee73d0806d165ebd645297e8;p=gosa.git msgPool git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9792 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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 8b90877f9..631306c64 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc +++ b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc @@ -404,50 +404,43 @@ class servdnseditZone extends plugin /* 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")); } } @@ -456,7 +449,7 @@ class servdnseditZone extends plugin /* 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 */ @@ -479,7 +472,7 @@ class servdnseditZone extends plugin } } 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 922e7af25..41cbf45c3 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZoneEntries.inc +++ b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZoneEntries.inc @@ -245,7 +245,7 @@ class servDNSeditZoneEntries extends plugin /* 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 @@ -452,13 +452,6 @@ class servDNSeditZoneEntries extends plugin "; -# if($record['type'] == "aRecord"){ -# $str .=""; -# }else{ -# $str .= ""; -# } - $str.= " ";