mirror of
https://github.com/netcccyun/dnsmgr.git
synced 2024-11-16 03:32:28 +08:00
fix
This commit is contained in:
parent
57a237f898
commit
ab074da839
|
@ -72,7 +72,7 @@ class cloudflare implements DnsInterface {
|
||||||
'Line' => $row['proxied'] ? '1' : '0',
|
'Line' => $row['proxied'] ? '1' : '0',
|
||||||
'TTL' => $row['ttl'],
|
'TTL' => $row['ttl'],
|
||||||
'MX' => isset($row['priority']) ? $row['priority'] : null,
|
'MX' => isset($row['priority']) ? $row['priority'] : null,
|
||||||
'Status' => $row['locked'] ? '0' : '1',
|
'Status' => '1',
|
||||||
'Weight' => null,
|
'Weight' => null,
|
||||||
'Remark' => $row['comment'],
|
'Remark' => $row['comment'],
|
||||||
'UpdateTime' => $row['modified_on'],
|
'UpdateTime' => $row['modified_on'],
|
||||||
|
@ -102,7 +102,7 @@ class cloudflare implements DnsInterface {
|
||||||
'Line' => $data['result']['proxied'] ? '1' : '0',
|
'Line' => $data['result']['proxied'] ? '1' : '0',
|
||||||
'TTL' => $data['result']['ttl'],
|
'TTL' => $data['result']['ttl'],
|
||||||
'MX' => isset($data['result']['priority']) ? $data['result']['priority'] : null,
|
'MX' => isset($data['result']['priority']) ? $data['result']['priority'] : null,
|
||||||
'Status' => $data['result']['locked'] ? '0' : '1',
|
'Status' => '1',
|
||||||
'Weight' => null,
|
'Weight' => null,
|
||||||
'Remark' => $data['result']['comment'],
|
'Remark' => $data['result']['comment'],
|
||||||
'UpdateTime' => $data['result']['modified_on'],
|
'UpdateTime' => $data['result']['modified_on'],
|
||||||
|
|
|
@ -117,6 +117,7 @@ class huawei implements DnsInterface {
|
||||||
//添加解析记录
|
//添加解析记录
|
||||||
public function addDomainRecord($Name, $Type, $Value, $Line = '0', $TTL = 600, $MX = 1, $Remark = null){
|
public function addDomainRecord($Name, $Type, $Value, $Line = '0', $TTL = 600, $MX = 1, $Remark = null){
|
||||||
$Name = $this->getHost($Name);
|
$Name = $this->getHost($Name);
|
||||||
|
if($Type == 'TXT' && substr($Value, 0, 1) != '"') $Value = '"'.$Value.'"';
|
||||||
$records = explode(',', $Value);
|
$records = explode(',', $Value);
|
||||||
$params = ['name' => $Name, 'type' => $this->convertType($Type), 'records' => $records, 'line'=>$Line, 'ttl' => intval($TTL), 'description' => $Remark];
|
$params = ['name' => $Name, 'type' => $this->convertType($Type), 'records' => $records, 'line'=>$Line, 'ttl' => intval($TTL), 'description' => $Remark];
|
||||||
if($Type == 'MX')$param['weight'] = intval($MX);
|
if($Type == 'MX')$param['weight'] = intval($MX);
|
||||||
|
@ -127,6 +128,7 @@ class huawei implements DnsInterface {
|
||||||
//修改解析记录
|
//修改解析记录
|
||||||
public function updateDomainRecord($RecordId, $Name, $Type, $Value, $Line = '0', $TTL = 600, $MX = 1, $Remark = null){
|
public function updateDomainRecord($RecordId, $Name, $Type, $Value, $Line = '0', $TTL = 600, $MX = 1, $Remark = null){
|
||||||
$Name = $this->getHost($Name);
|
$Name = $this->getHost($Name);
|
||||||
|
if($Type == 'TXT' && substr($Value, 0, 1) != '"') $Value = '"'.$Value.'"';
|
||||||
$records = explode(',', $Value);
|
$records = explode(',', $Value);
|
||||||
$params = ['name' => $Name, 'type' => $this->convertType($Type), 'records' => $records, 'line'=>$Line, 'ttl' => intval($TTL), 'description' => $Remark];
|
$params = ['name' => $Name, 'type' => $this->convertType($Type), 'records' => $records, 'line'=>$Line, 'ttl' => intval($TTL), 'description' => $Remark];
|
||||||
if($Type == 'MX')$param['weight'] = intval($MX);
|
if($Type == 'MX')$param['weight'] = intval($MX);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user