From 132dc960b297487f54a59eda4f15b2a9b4a9728d Mon Sep 17 00:00:00 2001 From: Karson Date: Mon, 29 Mar 2021 23:42:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E7=89=87=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=85=BC=E5=AE=B9=E6=80=A7BUG=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=8E=A7=E5=88=B6=E5=99=A8=E5=88=86=E7=BB=84?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=20=E4=BC=98=E5=8C=96=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Dashboard.php | 5 +++++ application/admin/lang/zh-cn/index.php | 3 ++- application/admin/view/common/header.html | 4 +++- application/common/library/Upload.php | 8 ++++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/application/admin/controller/Dashboard.php b/application/admin/controller/Dashboard.php index 1cad6b9e..053c722a 100644 --- a/application/admin/controller/Dashboard.php +++ b/application/admin/controller/Dashboard.php @@ -23,6 +23,11 @@ class Dashboard extends Backend */ public function index() { + try { + \think\Db::execute("SET @@sql_mode='';"); + } catch (\Exception $e) { + + } $column = []; $starttime = Date::unixtime('day', -6); $endtime = Date::unixtime('day', 0, 'end'); diff --git a/application/admin/lang/zh-cn/index.php b/application/admin/lang/zh-cn/index.php index 9d559c7b..21146677 100644 --- a/application/admin/lang/zh-cn/index.php +++ b/application/admin/lang/zh-cn/index.php @@ -33,12 +33,13 @@ return [ 'Verification code is incorrect' => '验证码不正确', 'Wipe cache completed' => '清除缓存成功', 'Wipe cache failed' => '清除缓存失败', - 'Wipe cache' => '清空缓存', + 'Wipe cache' => '清除缓存', 'Wipe all cache' => '一键清除缓存', 'Wipe content cache' => '清除内容缓存', 'Wipe template cache' => '清除模板缓存', 'Wipe addons cache' => '清除插件缓存', 'Wipe browser cache' => '清除浏览器缓存', + 'Wipe browser cache tips' => '清除浏览器端静态JS、CSS、图片等资源', 'Check for updates' => '检测更新', 'Discover new version' => '发现新版本', 'Go to download' => '去下载更新', diff --git a/application/admin/view/common/header.html b/application/admin/view/common/header.html index aa3b3e33..5efa6b05 100755 --- a/application/admin/view/common/header.html +++ b/application/admin/view/common/header.html @@ -39,7 +39,9 @@
  • {:__('Wipe content cache')}
  • {:__('Wipe template cache')}
  • {:__('Wipe addons cache')}
  • -
  • {:__('Wipe browser cache')}
  • +
  • {:__('Wipe browser cache')} + +
  • diff --git a/application/common/library/Upload.php b/application/common/library/Upload.php index 5a2604aa..ffa3eecf 100644 --- a/application/common/library/Upload.php +++ b/application/common/library/Upload.php @@ -273,6 +273,14 @@ class Upload throw new UploadException(__('Chunk file write error')); } $file = new File($destFile); + $info = [ + 'name' => $fileName, + 'type' => $file->getMime(), + 'tmp_name' => $destFile, + 'error' => 0, + 'size' => $file->getSize() + ]; + $file->setSaveName($fileName)->setUploadInfo($info); $this->setFile($file); return $file; }