作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !768
@@ -178,11 +178,11 @@ class DomainInfoLogic extends BaseLogic @@ -178,11 +178,11 @@ class DomainInfoLogic extends BaseLogic
178 if(!$this->check_cname($info['domain'], $serversIpInfo)){ 178 if(!$this->check_cname($info['domain'], $serversIpInfo)){
179 $this->fail('域名' . $info['domain'] . '未解析至目标服务器'); 179 $this->fail('域名' . $info['domain'] . '未解析至目标服务器');
180 } 180 }
181 - $domain_301 = []; 181 + $domain_301 = '';
182 foreach ($this->param['other_domain']??[] as $other_domain){ 182 foreach ($this->param['other_domain']??[] as $other_domain){
183 if($other_domain && substr($other_domain,0,2) != '*.'){ 183 if($other_domain && substr($other_domain,0,2) != '*.'){
184 if($this->check_a($other_domain,DomainInfo::SERVER_IP_301)){ 184 if($this->check_a($other_domain,DomainInfo::SERVER_IP_301)){
185 - $domain_301[] = $other_domain; 185 + $domain_301 = $other_domain;
186 }else{ 186 }else{
187 if(!$this->check_cname($other_domain, $serversIpInfo)){ 187 if(!$this->check_cname($other_domain, $serversIpInfo)){
188 $this->fail('域名' . $other_domain . '未解析至目标服务器'); 188 $this->fail('域名' . $other_domain . '未解析至目标服务器');
@@ -273,11 +273,11 @@ class DomainInfoLogic extends BaseLogic @@ -273,11 +273,11 @@ class DomainInfoLogic extends BaseLogic
273 //新增重定向任务 273 //新增重定向任务
274 $redirect_model = new DomainRedirectTask(); 274 $redirect_model = new DomainRedirectTask();
275 if($domain_301){ 275 if($domain_301){
276 - $domain_301 = Arr::a2s($domain_301);  
277 - $task_redirect_info = $redirect_model->read(['origin_domain'=>$domain_301,'status'=>['<',DomainRedirectTask::STATUS_SUC]]); 276 + $task_redirect_info = $redirect_model->read(['origin_domain'=>$domain_301]);
278 if(!$task_redirect_info){ 277 if(!$task_redirect_info){
279 $redirect_model->add([ 278 $redirect_model->add([
280 'origin_domain'=> $domain_301, 279 'origin_domain'=> $domain_301,
  280 + 'other_domain' => json_encode([]),
281 'target_domain' => $info['domain'] 281 'target_domain' => $info['domain']
282 ]); 282 ]);
283 } 283 }