From: hickert Date: Tue, 4 Sep 2007 07:41:08 +0000 (+0000) Subject: Updated dns stuff. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5c08ef78ffc32e9635e6eaab931d09ef31c1af27;p=gosa.git Updated dns stuff. Added option to add ptrrecord automatically git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7206 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servDNSeditZoneEntries.inc b/plugins/admin/systems/class_servDNSeditZoneEntries.inc index 3d86d940c..bcfa78c87 100644 --- a/plugins/admin/systems/class_servDNSeditZoneEntries.inc +++ b/plugins/admin/systems/class_servDNSeditZoneEntries.inc @@ -107,6 +107,23 @@ class servDNSeditZoneEntries extends plugin } } + /* Add PTR record + */ + if((preg_match("/^AddPtr_/",$name)) && ($once)){ + $once = false; + if(isset($this->Devices[$Name]['RECORDS'][$RecordID])){ + $tmp = $this->Devices[$Name]['RECORDS'][$RecordID]; + $ip = $tmp['value']; + $match = preg_replace("/^[^\/]*+\//","",$this->reverseName); + $ip = preg_replace("/^".normalizePreg($match)."/","",$ip); + $ip = preg_replace("/^\./","",$ip); + $tmp['type'] = "pTRRecord"; + $tmp['value'] = $ip; + $this->Devices[$Name]['RECORDS'][] = $tmp; + } + } + + } /* Fill templating stuff */ @@ -393,10 +410,20 @@ class servDNSeditZoneEntries extends plugin - + - + "; + + if($record['type'] == "aRecord"){ + $str .=""; + }else{ + $str .= ""; + } + + $str.= + " "; } $str .=""; diff --git a/plugins/admin/systems/network.tpl b/plugins/admin/systems/network.tpl index 9527e32dd..0fc2bb51b 100644 --- a/plugins/admin/systems/network.tpl +++ b/plugins/admin/systems/network.tpl @@ -71,6 +71,8 @@ {if $DNS_is_account==true} + + {if $ZoneCnt} {if $DNSAccount == true}