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