index 42f0519647412c8e4c6efa0ee0bd5f1c4fdad17f..7ce7c33efc056d19ae9ff4e64543f95d6e317744 100644 (file)
*/
foreach($oldZones as $zone) {
$oldDn = "zoneName=".$zone['InitialzoneName'].",".$HostDn;
*/
foreach($oldZones as $zone) {
$oldDn = "zoneName=".$zone['InitialzoneName'].",".$HostDn;
- $del[$oldDn] = "";
+ $del[$oldDn] = $zone;
}
/* Check for entries which must be updated
}
/* Check for entries which must be updated
* like pTRRecord or CNAMERecord
*/
if($rec['type'] == "pTRRecord"){
* like pTRRecord or CNAMERecord
*/
if($rec['type'] == "pTRRecord"){
- $PTRdn= "relativeDomainName=".$rec['value'].",".$baseDn;
+ $PTRdn= "relativeDomainName=".FlipIP($rec['value']).",".$baseDn;
$ptrObj = $baseObj;
$reverseName = getNameFromMix($reverseNameMix);
$ptrObj['zoneName'] = $reverseName;
$ptrObj = $baseObj;
$reverseName = getNameFromMix($reverseNameMix);
$ptrObj['zoneName'] = $reverseName;
- $ptrObj['pTRRecord'] = preg_replace("/\.\.$/",".",$newName.".".$zoneName.".");
- $ptrObj['relativeDomainName'] = $rec['value'];
+ if(!preg_match("/\.$/",$newName)){
+ $ptrObj['pTRRecord'] = preg_replace("/\.\.$/",".",$newName.".".$zoneName.".");
+ }else{
+ $ptrObj['pTRRecord'] = preg_replace("/\.\.$/",".",$newName.".");
+ }
+ $ptrObj['relativeDomainName'] = FlipIP($rec['value']);
$add[$PTRdn] = $ptrObj;
}else
$add[$PTRdn] = $ptrObj;
}else