powerDNS problem - resync does not create missing entries
when adding a powerDNS database, it does not get populated, as only soa_update and rr_update are called.
Fix: @@ -161,7 +161,9 @@ if($data["old"]["active"] != 'Y') return; $this->soa_delete($event_name,$data); } else {
-
if($data["old"]["active"] == 'Y'){
-
//check if really active...
-
$exists = $app->db->queryOneRecord("SELECT * FROM powerdns.domains WHERE ispconfig_id = ".$data["new"]["id"]) ;
-
if($data["old"]["active"] == 'Y' && $exists){ $origin = substr($data["new"]["origin"], 0, -1); $ispconfig_id = $data["new"]["id"]; $serial = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ".$ispconfig_id);
@@ -346,7 +348,8 @@ if($data["old"]["active"] != 'Y') return; $this->rr_delete($event_name,$data); } else {
-
if($data["old"]["active"] == 'Y'){
-
$exists = $app->db->queryOneRecord("SELECT * FROM powerdns.domains WHERE ispconfig_id = ".$data["new"]["id"]) ;
-
if($data["old"]["active"] == 'Y' && $exists){ $zone = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ".$data["new"]["zone"]); $origin = substr($zone["origin"], 0, -1); $powerdns_zone = $app->db->queryOneRecord("SELECT * FROM powerdns.domains WHERE ispconfig_id = ".$data["new"]["zone"]." AND type = 'MASTER'");