summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dce9d93)
raw | patch | inline | side by side (parent: dce9d93)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 27 Jun 2007 11:57:35 +0000 (11:57 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 27 Jun 2007 11:57:35 +0000 (11:57 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6723 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_servDNSeditZone.inc | patch | blob | history | |
plugins/admin/systems/servdnseditzone.tpl | patch | blob | history |
diff --git a/plugins/admin/systems/class_servDNSeditZone.inc b/plugins/admin/systems/class_servDNSeditZone.inc
index db855482143ddd65a6fc7339fc6b3b7e0d059994..b60c9a55218d9c53346ac10fee401b854b71dfd3 100644 (file)
$this->sOAmail = preg_replace("/\./","@",$this->sOAmail,1);
$this->sOAmail = preg_replace("/\.$/","",$this->sOAmail);
$this->sOAprimary = preg_replace("/\.$/","",$this->sOAprimary);
-
+ $this->zoneName = preg_replace("/\.$/","",$this->zoneName);
if(isset($attrs['RECORDS'])){
$this->Records = $attrs['RECORDS'];
$smarty->assign("Mxrecords", $div->DrawList());
$smarty->assign("records" , $this->generateRecordsList());
$smarty->assign("NetworkClass", $this->NetworkClass);
- $smarty->assign("NetworkClasses", array("A"=>"A","B"=>"B","C"=>"C"));
+ $smarty->assign("NetworkClasses", array("A"=>"255.0.0.0 (Class A)","B"=>"255.255.0.0 (Class B)","C"=>"255.255.255.0 (Class C)"));
/* Display tempalte */
$display.= $smarty->fetch(get_template_path('servdnseditzone.tpl', TRUE));
if(!is_ip($addr)){
$message[] = _("The given network address is not a valid, please specify a valid IP address.");
}
-
+
/* Check if given address matches selected network class */
switch($this->NetworkClass){
case 'A': {
$ret['InitialzoneName'] = $this->InitialzoneName;
$ret['sOAmail'] = preg_replace("/\@/",".",$this->sOAmail);
- $ret['sOAmail'] = $ret['sOAmail'].".";
- $ret['sOAprimary'] = $ret['sOAprimary'].".";
+
+ foreach(array("sOAprimary","zoneName","sOAmail") as $attr){
+ if(!preg_match("/\.$/",$ret[$attr])){
+ $ret[$attr] = $ret[$attr].".";
+ }
+ }
return($ret);
}
index 99bf1c9c2c225326717098441d625e9af5052295..702e7717b81c7d4cc03c6a489c31a6dea93ecfdc 100644 (file)
</td>
</tr>
<tr>
- <td>{t}Network class{/t}
+ <td>{t}Netmask{/t}
</td>
<td>
<select name="NetworkClass" {if $NotNew} disabled {/if}>