mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
fix:修复模块安装、卸载等操作时管理员日志中标题为未知的问题
This commit is contained in:
parent
f785d804ad
commit
062590e5a6
@ -5,6 +5,7 @@ namespace app\admin\controller;
|
||||
use Throwable;
|
||||
use ba\Exception;
|
||||
use think\facade\Config;
|
||||
use app\admin\model\AdminLog;
|
||||
use app\admin\library\module\Server;
|
||||
use app\admin\library\module\Manage;
|
||||
use app\common\controller\Backend;
|
||||
@ -39,6 +40,7 @@ class Module extends Backend
|
||||
|
||||
public function install()
|
||||
{
|
||||
AdminLog::setTitle(__('Install module'));
|
||||
$uid = $this->request->get("uid/s", '');
|
||||
$token = $this->request->get("token/s", '');
|
||||
$orderId = $this->request->get("orderId/d", 0);
|
||||
@ -76,6 +78,7 @@ class Module extends Backend
|
||||
|
||||
public function changeState()
|
||||
{
|
||||
AdminLog::setTitle(__('Change module state'));
|
||||
$uid = $this->request->post("uid/s", '');
|
||||
$state = $this->request->post("state/b", false);
|
||||
if (!$uid) {
|
||||
@ -96,6 +99,7 @@ class Module extends Backend
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
AdminLog::setTitle(__('Unload module'));
|
||||
$uid = $this->request->get("uid/s", '');
|
||||
if (!$uid) {
|
||||
$this->error(__('Parameter error'));
|
||||
@ -112,6 +116,7 @@ class Module extends Backend
|
||||
|
||||
public function update()
|
||||
{
|
||||
AdminLog::setTitle(__('Update module'));
|
||||
$uid = $this->request->get("uid/s", '');
|
||||
$token = $this->request->get("token/s", '');
|
||||
$orderId = $this->request->get("orderId/d", 0);
|
||||
@ -130,6 +135,7 @@ class Module extends Backend
|
||||
|
||||
public function upload()
|
||||
{
|
||||
AdminLog::setTitle(__('Upload install module'));
|
||||
$file = $this->request->get("file/s", '');
|
||||
if (!$file) {
|
||||
$this->error(__('Parameter error'));
|
||||
|
@ -18,4 +18,9 @@ return [
|
||||
'Please disable the module first' => '请先禁用模块',
|
||||
'Please disable the module before updating' => '更新前请先禁用模块',
|
||||
'The directory required by the module is occupied' => '模块所需目录已被占用',
|
||||
'Install module' => '安装模块',
|
||||
'Unload module' => '卸载模块',
|
||||
'Update module' => '更新模块',
|
||||
'Change module state' => '改变模块状态',
|
||||
'Upload install module' => '上传安装模块',
|
||||
];
|
Loading…
Reference in New Issue
Block a user