-
-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support for PowerDNS-Replication (#974)
Adding support for powerdns-replication
- Loading branch information
Showing
7 changed files
with
39 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 @@ | |
* @author Froxlor team <[email protected]> (2016-) | ||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt | ||
* @package Cron | ||
* | ||
* | ||
*/ | ||
class PowerDNS extends DnsBase | ||
{ | ||
|
@@ -111,15 +113,16 @@ private function clearZoneTables($domains = null) | |
|
||
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 = "") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters