correctly use system-setting of default-ttl, thx to K1rk
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -1669,7 +1669,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
||||
* @param string $extra
|
||||
* optional, default empty
|
||||
* @param int $increase_by
|
||||
* optional, default 1
|
||||
* optional, default 1
|
||||
*/
|
||||
public static function increaseUsage($customerid = 0, $resource = null, $extra = '', $increase_by = 1)
|
||||
{
|
||||
@@ -1684,7 +1684,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
||||
* @param string $extra
|
||||
* optional, default empty
|
||||
* @param int $decrease_by
|
||||
* optional, default 1
|
||||
* optional, default 1
|
||||
*/
|
||||
public static function decreaseUsage($customerid = 0, $resource = null, $extra = '', $decrease_by = 1)
|
||||
{
|
||||
|
||||
@@ -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