作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

... ... @@ -65,7 +65,7 @@ class ProjectLogic extends BaseLogic
public function getProjectInfo($id){
$info = $this->model->with('payment')->with('deploy_build')->with('deploy_optimize')->with('online_check')
->with('project_after')->where(['id'=>$id])->first()->toArray();
$info['online_check']['name'] = (new Manage())->getName(!empty($info['online_check']['created_manage_id']) ?? '');
$info['online_check']['name'] = (new Manage())->getName($info['online_check']['created_manage_id'] ?? 0);
$info['deploy_optimize']['minor_keywords'] = !empty($info['deploy_optimize']['minor_keywords']) ? json_decode($info['deploy_optimize']['minor_keywords']) : [];
$info['init_domain'] = $this->getInitDomain($info['serve_id'])['domain'];
if($info['extend_type'] != 0){
... ...
... ... @@ -64,8 +64,8 @@ class BlogLogic extends BaseLogic
$info = $this->model->read(['id'=>$id],['id','url']);
if($info['url'] != $route){
$this->addUpdateNotify(RouteMap::SOURCE_BLOG,$route);
$this->curlDelRoute(['route'=>$info['url'],'new_route'=>$route]);
}
$this->curlDelRoute(['route'=>$info['url'],'new_route'=>$route]);
return true;
}
... ...
... ... @@ -96,8 +96,8 @@ class NewsLogic extends BaseLogic
$info = $this->model->read(['id' => $id], ['id', 'url']);
if ($info['url'] != $route) {
$this->addUpdateNotify(RouteMap::SOURCE_NEWS,$route);
$this->curlDelRoute(['route'=>$info['url'],'new_route'=>$route]);
}
$this->curlDelRoute(['route'=>$info['url'],'new_route'=>$route]);
return true;
}
... ...
... ... @@ -332,8 +332,8 @@ class ProductLogic extends BaseLogic
$info = $this->model->read(['id'=>$id]);
if($info['route'] != $route){
$this->addUpdateNotify(RouteMap::SOURCE_PRODUCT,$route);
$this->curlDelRoute(['route'=>$info['route'],'new_route'=>$route]);
}
$this->curlDelRoute(['route'=>$info['route'],'new_route'=>$route]);
return $route;
}
... ...
... ... @@ -39,14 +39,8 @@ class Manage extends Base
public function getName($id){
$name = '';
if(!empty($id)){
$info = Common::get_user_cache('manager',$id,'A');
if(empty($info)){
$info = $this->read(['id'=>$id],['id','name']);
if($info !== false){
$name = $info['name'];
Common::set_user_cache($info,'manager',$id,'A');
}
}else{
$info = $this->read(['id'=>$id],['id','name']);
if($info !== false){
$name = $info['name'];
}
}
... ...