From 8c1ddfb15424144b899f8c072cd2c9d653675a08 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 1 Feb 2008 14:08:04 +0000 Subject: [PATCH] Moved record types to the class. Closes #330 git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8723 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/services/dns/class_DNS.inc | 69 ++++++++----------- 1 file changed, 29 insertions(+), 40 deletions(-) diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc b/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc index 20db6f1d8..2359889d0 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc +++ b/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc @@ -1,49 +1,44 @@ "aRecord", + 'mDRecord' => "mDRecord", + 'mXRecord' => "mXRecord", + 'nSRecord' => "nSRecord", + 'pTRRecord' => "relativeDomainName", + 'hInfoRecord' => "hInfoRecord", + 'mInfoRecord' => "mInfoRecord", + 'cNAMERecord' => "relativeDomainName", + 'tXTRecord' => "tXTRecord", + 'aFSDBRecord' => "aFSDBRecord", + 'SigRecord' => "SigRecord", + 'KeyRecord' => "KeyRecord", + 'aAAARecord' => "aAAARecord", + 'LocRecord' => "LocRecord", + 'nXTRecord' => "nXTRecord", + 'sRVRecord' => "sRVRecord", + 'nAPTRRecord' => "nAPTRRecord", + 'kXRecord' => "kXRecord", + 'certRecord' => "certRecord", + 'a6Record' => "a6Record", + 'dSRecord' => "dSRecord", + 'sSHFPRecord' => "sSHFPRecord", + 'rRSIGRecord' => "rRSIGRecord", + 'nSECRecord' => "nSECRecord"); + /* All available record types */ /* Return all record types */ static function getDnsRecordTypes($ForZones = false) { - global $RecordTypes; if($ForZones){ - $tmp = $RecordTypes; + $tmp = DNS::$RecordTypes; unset($tmp['cNAMERecord']); unset($tmp['pTRRecord']); unset($tmp['tXTRecord']); return($tmp); }else{ - return($RecordTypes); + return(DNS::$RecordTypes); } } @@ -68,8 +63,6 @@ class DNS */ static function getDNSZoneEntries($config,$HostDn,$silent = false) { - global $RecordTypes; - $ldap = $config->get_ldap_link(); $ldap->cd($config->current['BASE']); @@ -141,7 +134,7 @@ class DNS /* Get record attributes */ - foreach($RecordTypes as $name => $value){ + foreach(DNS::$RecordTypes as $name => $value){ /* Skip some attributes */ @@ -337,8 +330,6 @@ class DNS */ static function getDNSHostEntries($config,$name,$silent = false) { - global $RecordTypes; - $types = array(); $ret = array(); $ret['RECORDS'] = array(); @@ -405,7 +396,7 @@ class DNS } /* Create list with all used records */ - foreach($RecordTypes as $name => $value){ + foreach(DNS::$RecordTypes as $name => $value){ /* If there is a record attribute */ if(isset($attrs[$name])){ @@ -432,8 +423,6 @@ class DNS */ static function getDNSHostEntriesDiff($config,$oldName,$newEntry,$newName) { - global $RecordTypes; - $oldEntry = DNS::getDNSHostEntries($config,$oldName); $add = array(); -- 2.30.2