From 8630e9b3177bde3b6d3425d310fbadbd703464ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Sat, 21 Oct 2023 02:17:28 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E4=BC=98=E5=8C=96=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=AE=89=E8=A3=85=E6=97=B6=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Module.php | 6 +++--- app/admin/lang/zh-cn/module.php | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/admin/controller/Module.php b/app/admin/controller/Module.php index 6dce8299..f4c0f8b4 100644 --- a/app/admin/controller/Module.php +++ b/app/admin/controller/Module.php @@ -138,9 +138,9 @@ class Module extends Backend AdminLog::setTitle(__('Upload install module')); $file = $this->request->get("file/s", ''); $token = $this->request->get("token/s", ''); - if (!$file || !$token) { - $this->error(__('Parameter error')); - } + if (!$file) $this->error(__('Parameter error')); + if (!$token) $this->error(__('Please login to the official website account first')); + $info = []; try { $info = Manage::instance()->upload($token, $file); diff --git a/app/admin/lang/zh-cn/module.php b/app/admin/lang/zh-cn/module.php index c7050fd0..84bccfc4 100644 --- a/app/admin/lang/zh-cn/module.php +++ b/app/admin/lang/zh-cn/module.php @@ -24,4 +24,5 @@ return [ 'Update module' => '更新模块', 'Change module state' => '改变模块状态', 'Upload install module' => '上传安装模块', + 'Please login to the official website account first' => '请先使用BuildAdmin官网账户登录到模块市场~', ]; \ No newline at end of file