From 36a02e6fbbcc9429ed87931868006ec8fc89d7a9 Mon Sep 17 00:00:00 2001 From: hdm Date: Fri, 29 Apr 2022 11:53:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E4=BB=BD=E8=BF=98=E5=8E=9F=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/home/controller/Database.php | 8 ++++---- config/log.php | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/home/controller/Database.php b/app/home/controller/Database.php index 74b908a..7b6d992 100644 --- a/app/home/controller/Database.php +++ b/app/home/controller/Database.php @@ -59,7 +59,7 @@ class Database extends BaseController foreach ($tables as $table) { $this->db->setFile()->backup($table, 0); } - add_log('add'); + add_log('bak'); return to_assign(0, '备份成功!'); } else { return to_assign(1, '请选择要备份的表'); @@ -75,7 +75,7 @@ class Database extends BaseController } $tables = explode(',', $tables); if ($this->db->optimize($tables)) { - add_log('edit'); + add_log('optimize'); return to_assign(0, '数据表优化成功!'); } else { return to_assign(1, '数据表优化出错请重试'); @@ -91,7 +91,7 @@ class Database extends BaseController } $tables = explode(',', $tables); if ($this->db->repair($tables)) { - add_log('edit'); + add_log('repair'); return to_assign(0, '数据表修复成功'); } else { return to_assign(1, '数据表修复出错请重试'); @@ -121,7 +121,7 @@ class Database extends BaseController { $list = $this->db->getFile('timeverif', $id); $this->db->setFile($list)->import(1); - add_log('save'); + add_log('reduction'); return to_assign(0, '还原成功!'); } diff --git a/config/log.php b/config/log.php index 45435ee..b8713f6 100644 --- a/config/log.php +++ b/config/log.php @@ -45,6 +45,10 @@ return [ 'login' => '登录', 'upload' => '上传', 'down' => '下载', + 'bak' => '备份', + 'optimize' => '优化', + 'repair' => '修复', + 'reduction' => '还原', 'import' => '导入', 'export' => '导出', 'add' => '新增',