From 27756a8da2ce0548316e7ca95676d873fe8a834e Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 4 Sep 2007 07:32:45 +0000 Subject: [PATCH] Added option to add pTRRedcord automatically with editing zone entries git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7205 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/class_servDNSeditZoneEntries.inc | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/plugins/admin/systems/class_servDNSeditZoneEntries.inc b/plugins/admin/systems/class_servDNSeditZoneEntries.inc index ae5253eb7..4eae25030 100644 --- a/plugins/admin/systems/class_servDNSeditZoneEntries.inc +++ b/plugins/admin/systems/class_servDNSeditZoneEntries.inc @@ -104,6 +104,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 */ @@ -396,10 +413,20 @@ class servDNSeditZoneEntries extends plugin - + - + "; + + if($record['type'] == "aRecord"){ + $str .=""; + }else{ + $str .= ""; + } + + $str.= + " "; } $str .=""; -- 2.30.2