summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6cb06f9)
raw | patch | inline | side by side (parent: 6cb06f9)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 1 Feb 2008 14:08:04 +0000 (14:08 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 1 Feb 2008 14:08:04 +0000 (14:08 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8723 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc | patch | blob | history |
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 20db6f1d8b3e947d6701eab6f7e1e7d0be1b0f98..2359889d05d7b0325bce6507256660975beec44c 100644 (file)
<?php
-
-/* All available record types
- */
-$RecordTypes['aRecord'] = "aRecord";
-$RecordTypes['mDRecord'] = "mDRecord";
-$RecordTypes['mXRecord'] = "mXRecord";
-$RecordTypes['nSRecord'] = "nSRecord";
-$RecordTypes['pTRRecord'] = "relativeDomainName";
-$RecordTypes['hInfoRecord'] = "hInfoRecord";
-$RecordTypes['mInfoRecord'] = "mInfoRecord";
-$RecordTypes['cNAMERecord'] = "relativeDomainName";
-$RecordTypes['tXTRecord'] = "tXTRecord";
-$RecordTypes['aFSDBRecord'] = "aFSDBRecord";
-$RecordTypes['SigRecord'] = "SigRecord";
-$RecordTypes['KeyRecord'] = "KeyRecord";
-$RecordTypes['aAAARecord'] = "aAAARecord";
-$RecordTypes['LocRecord'] = "LocRecord";
-$RecordTypes['nXTRecord'] = "nXTRecord";
-$RecordTypes['sRVRecord'] = "sRVRecord";
-$RecordTypes['nAPTRRecord'] = "nAPTRRecord";
-$RecordTypes['kXRecord'] = "kXRecord";
-$RecordTypes['certRecord'] = "certRecord";
-$RecordTypes['a6Record'] = "a6Record";
-$RecordTypes['dSRecord'] = "dSRecord";
-$RecordTypes['sSHFPRecord'] = "sSHFPRecord";
-$RecordTypes['rRSIGRecord'] = "rRSIGRecord";
-$RecordTypes['nSECRecord'] = "nSECRecord";
-
class DNS
{
-
+ static $RecordTypes= array('aRecord' => "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);
}
}
*/
static function getDNSZoneEntries($config,$HostDn,$silent = false)
{
- global $RecordTypes;
-
$ldap = $config->get_ldap_link();
$ldap->cd($config->current['BASE']);
/* Get record attributes
*/
- foreach($RecordTypes as $name => $value){
+ foreach(DNS::$RecordTypes as $name => $value){
/* Skip some attributes
*/
*/
static function getDNSHostEntries($config,$name,$silent = false)
{
- global $RecordTypes;
-
$types = array();
$ret = array();
$ret['RECORDS'] = array();
}
/* 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])){
*/
static function getDNSHostEntriesDiff($config,$oldName,$newEntry,$newName)
{
- global $RecordTypes;
-
$oldEntry = DNS::getDNSHostEntries($config,$oldName);
$add = array();