This commit is contained in:
net909 2024-07-25 20:39:21 +08:00
parent 57a237f898
commit ab074da839
2 changed files with 4 additions and 2 deletions

View File

@ -72,7 +72,7 @@ class cloudflare implements DnsInterface {
'Line' => $row['proxied'] ? '1' : '0',
'TTL' => $row['ttl'],
'MX' => isset($row['priority']) ? $row['priority'] : null,
'Status' => $row['locked'] ? '0' : '1',
'Status' => '1',
'Weight' => null,
'Remark' => $row['comment'],
'UpdateTime' => $row['modified_on'],
@ -102,7 +102,7 @@ class cloudflare implements DnsInterface {
'Line' => $data['result']['proxied'] ? '1' : '0',
'TTL' => $data['result']['ttl'],
'MX' => isset($data['result']['priority']) ? $data['result']['priority'] : null,
'Status' => $data['result']['locked'] ? '0' : '1',
'Status' => '1',
'Weight' => null,
'Remark' => $data['result']['comment'],
'UpdateTime' => $data['result']['modified_on'],

View File

@ -117,6 +117,7 @@ class huawei implements DnsInterface {
//添加解析记录
public function addDomainRecord($Name, $Type, $Value, $Line = '0', $TTL = 600, $MX = 1, $Remark = null){
$Name = $this->getHost($Name);
if($Type == 'TXT' && substr($Value, 0, 1) != '"') $Value = '"'.$Value.'"';
$records = explode(',', $Value);
$params = ['name' => $Name, 'type' => $this->convertType($Type), 'records' => $records, 'line'=>$Line, 'ttl' => intval($TTL), 'description' => $Remark];
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){
$Name = $this->getHost($Name);
if($Type == 'TXT' && substr($Value, 0, 1) != '"') $Value = '"'.$Value.'"';
$records = explode(',', $Value);
$params = ['name' => $Name, 'type' => $this->convertType($Type), 'records' => $records, 'line'=>$Line, 'ttl' => intval($TTL), 'description' => $Remark];
if($Type == 'MX')$param['weight'] = intval($MX);