X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Ffunctions_dns.inc;h=f24ec32473c67c3d1415e0ff87a0bdffc832efa6;hb=440d89fb458e56ac12369a090b1156e2d6711160;hp=abc92a23645701766b390aa7c11b55620b1eff80;hpb=9257dd8235e8950a0327cf1806a7784c595909e4;p=gosa.git diff --git a/include/functions_dns.inc b/include/functions_dns.inc index abc92a236..f24ec3247 100644 --- a/include/functions_dns.inc +++ b/include/functions_dns.inc @@ -434,6 +434,13 @@ function getDNSHostEntriesDiff($config,$oldName,$newEntry,$newName) $del = array(); $move = array(); + /* Don't go further if there is nothing to do + * Is no account / was no account + */ + if(($newEntry['exists'] == false )&& ($oldEntry['exists'] == false)){ + return(array("move"=>$move,"add"=>$add,"del"=>$del)); + } + $zones = getAvailableZones($config); $specialAttributes = array("cNAMERecord","pTRRecord"); $newRecords = array(); // Used to remember which records are removed @@ -455,13 +462,6 @@ function getDNSHostEntriesDiff($config,$oldName,$newEntry,$newName) $newEntry['exists'] = false; } - /* Don't go further if there is nothing to do - * Is no account / was no account - */ - if(($newEntry['exists'] == false )&& ($oldEntry['exists'] == false)){ - return(array("move"=>$move,"add"=>$add,"del"=>$del)); - } - /* If account was edited prepare some * attributes & arrays ... if required add some * dns to $move @@ -479,7 +479,7 @@ function getDNSHostEntriesDiff($config,$oldName,$newEntry,$newName) /* Check if zoneName has changed */ if(count($newEntry['RECORDS'])){ - if($oldEntry['zoneName'] != $zoneName){ + if($oldEntry['zoneName'] != $newEntry['zoneName']){ $oldzoneDn = getDNSZoneDN($config,$oldEntry['zoneName']); $dn = "relativeDomainName=".$oldName.",".$oldzoneDn; $dn2= "relativeDomainName=".$oldName.",".$zoneDn;