diff --git a/app/admin/controller/Set.php b/app/admin/controller/Set.php index 7f52742..608fc9b 100644 --- a/app/admin/controller/Set.php +++ b/app/admin/controller/Set.php @@ -24,7 +24,7 @@ class Set extends AdminController { $mailserver = MailServer::find(1); $sysInfo = Db::name('system')->find(1); - $syscy = $this->cyCheck($sysInfo['base_url']); + $syscy = $this->cyCheck($sysInfo['base_url'],$sysInfo['domain']); $template = Files::getDirName('../view'); View::assign(['sysInfo'=>$sysInfo,'syscy'=>$syscy,'mailserver'=>$mailserver,'template'=>$template]); return View::fetch('set/system/website'); diff --git a/app/admin/controller/Upgrade.php b/app/admin/controller/Upgrade.php index 6495447..0bf3047 100644 --- a/app/admin/controller/Upgrade.php +++ b/app/admin/controller/Upgrade.php @@ -143,7 +143,7 @@ class Upgrade extends AdminController $version_num = $versions->version; $file_url = $versions->src; - halt($version_num); + //判断远程文件是否可用存在 $header = get_headers($file_url, true); if(!isset($header[0]) && (strpos($header[0], '200') || strpos($header[0], '304'))){ @@ -166,7 +166,7 @@ class Upgrade extends AdminController } //记录下日志 Log::channel('update')->info('update:{type} {progress} {msg}',['type'=>'success','progress'=>'20%','msg'=>'上传升级包成功!']); -/* +/**/ //升级前备份代码 $ex = array('.git','.idea','runtime','data','addons','config','extend'); // 排除备份文件夹 $backup_code_res = Files::copydirs('../', $this->backup_dir, $ex); @@ -176,7 +176,7 @@ class Upgrade extends AdminController } Log::channel('update')->info('update:{type} {progress} {msg}',['type'=>'success','progress'=>'30%','msg'=>'执行文件备份成功!']); -*/ + //执行升级 $upres = $this->execute_update($package_file); //更新版本 @@ -186,8 +186,8 @@ class Upgrade extends AdminController 'version' => $version_num ]; $setconf = new SetConf; - $res = $setconf->setconfig('taoler',$value); - var_dump($res); + $upres = $setconf->setconfig('taoler',$value); + if($upres){ return json(["code"=>0,"msg"=>"升级成功"]); }else { diff --git a/app/admin/view/login/login.html b/app/admin/view/login/login.html index cc60d7f..1714917 100644 --- a/app/admin/view/login/login.html +++ b/app/admin/view/login/login.html @@ -1,6 +1,6 @@ {extend name="public/base" /} -{block name="title"}登入 - TaoilSys加油站管理系统{/block} +{block name="title"}登入 - TaolerCMS管理系统{/block} {block name="css"}{/block} {block name="body"}