correctly use system-setting of default-ttl, thx to K1rk
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -32,13 +32,13 @@ class DnsEntry
|
||||
|
||||
public $content;
|
||||
|
||||
public function __construct($record = '', $type = 'A', $content = null, $prio = 0, $ttl = 18000, $class = 'IN')
|
||||
public function __construct($record = '', $type = 'A', $content = null, $prio = 0, $ttl = 0, $class = 'IN')
|
||||
{
|
||||
$this->record = $record;
|
||||
$this->type = $type;
|
||||
$this->content = $content;
|
||||
$this->priority = $prio;
|
||||
$this->ttl = $ttl;
|
||||
$this->ttl = ($ttl <= 0 ? Settings::Get('system.defaultttl') : $ttl);
|
||||
$this->class = $class;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace Froxlor\Dns;
|
||||
|
||||
use Froxlor\Settings;
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2016 the Froxlor Team (see authors).
|
||||
@@ -26,9 +28,9 @@ class DnsZone
|
||||
|
||||
public $records;
|
||||
|
||||
public function __construct($ttl = 18000, $origin = '', $serial = '', $records = null)
|
||||
public function __construct($ttl = 0, $origin = '', $serial = '', $records = null)
|
||||
{
|
||||
$this->ttl = $ttl;
|
||||
$this->ttl = ($ttl <= 0 ? Settings::Get('system.defaultttl') : $ttl);
|
||||
$this->origin = $origin;
|
||||
$this->serial = $serial;
|
||||
$this->records = $records;
|
||||
|
||||
Reference in New Issue
Block a user