remove 'change_date' field from pdns-records table as it is being removed in pdns >=4.2; fixes #645

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2019-02-08 07:59:02 +01:00
parent 1b5e31e59d
commit 21f9a24780

View File

@@ -124,8 +124,6 @@ class PowerDNS extends DnsBase
private function insertRecords($domainid = 0, $records = array(), $origin = "")
{
$changedate = date('Ymds', time());
$ins_stmt = PowerDNS::getDB()->prepare("
INSERT INTO records set
`domain_id` = :did,
@@ -134,8 +132,7 @@ class PowerDNS extends DnsBase
`content` = :content,
`ttl` = :ttl,
`prio` = :prio,
`disabled` = '0',
`change_date` = :changedate
`disabled` = '0'
");
foreach ($records as $record) {
@@ -156,8 +153,7 @@ class PowerDNS extends DnsBase
'type' => $record->type,
'content' => $record->content,
'ttl' => $record->ttl,
'prio' => $record->priority,
'changedate' => $changedate
'prio' => $record->priority
);
$ins_stmt->execute($ins_data);
}