From 5c08ef78ffc32e9635e6eaab931d09ef31c1af27 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 4 Sep 2007 07:41:08 +0000 Subject: [PATCH] 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 --- .../systems/class_servDNSeditZoneEntries.inc | 31 +++++++++++++++++-- plugins/admin/systems/network.tpl | 2 ++ 2 files changed, 31 insertions(+), 2 deletions(-) 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}