Adding support for PowerDNS-Replication (#974)
Adding support for powerdns-replication
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace Froxlor\Cron\Dns;
|
||||
|
||||
use Froxlor\Settings;
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2016 the Froxlor Team (see authors).
|
||||
@@ -13,7 +15,7 @@ namespace Froxlor\Cron\Dns;
|
||||
* @author Froxlor team <team@froxlor.org> (2016-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Cron
|
||||
*
|
||||
*
|
||||
*/
|
||||
class PowerDNS extends DnsBase
|
||||
{
|
||||
@@ -111,15 +113,16 @@ class PowerDNS extends DnsBase
|
||||
|
||||
private function insertZone($domainname, $serial = 0)
|
||||
{
|
||||
$ins_stmt = \Froxlor\Dns\PowerDNS::getDB()->prepare("
|
||||
INSERT INTO domains set `name` = :domainname, `notified_serial` = :serial, `type` = 'NATIVE'
|
||||
$ins_stmt = \Froxlor\Dns\PowerDNS::getDB()->prepare("
|
||||
INSERT INTO domains set `name` = :domainname, `notified_serial` = :serial, `type` = :type
|
||||
");
|
||||
$ins_stmt->execute(array(
|
||||
'domainname' => $domainname,
|
||||
'serial' => $serial
|
||||
));
|
||||
$lastid = \Froxlor\Dns\PowerDNS::getDB()->lastInsertId();
|
||||
return $lastid;
|
||||
$ins_stmt->execute(array(
|
||||
'domainname' => $domainname,
|
||||
'serial' => $serial,
|
||||
'type' => strtoupper(Settings::Get('system.powerdns_mode'))
|
||||
));
|
||||
$lastid = \Froxlor\Dns\PowerDNS::getDB()->lastInsertId();
|
||||
return $lastid;;
|
||||
}
|
||||
|
||||
private function insertRecords($domainid = 0, $records = array(), $origin = "")
|
||||
|
||||
@@ -10,7 +10,7 @@ final class Froxlor
|
||||
const VERSION = '0.10.27';
|
||||
|
||||
// Database version (YYYYMMDDC where C is a daily counter)
|
||||
const DBVERSION = '202107300';
|
||||
const DBVERSION = '202108180';
|
||||
|
||||
// Distribution branding-tag (used for Debian etc.)
|
||||
const BRANDING = '';
|
||||
|
||||
Reference in New Issue
Block a user