备份还原优化

This commit is contained in:
hdm 2022-04-29 11:55:10 +08:00
parent ac0d71c86b
commit ca9e679729
2 changed files with 8 additions and 4 deletions

View File

@ -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, '还原成功!');
}

View File

@ -45,6 +45,10 @@ return [
'login' => '登录',
'upload' => '上传',
'down' => '下载',
'bak' => '备份',
'optimize' => '优化',
'repair' => '修复',
'reduction' => '还原',
'import' => '导入',
'export' => '导出',
'add' => '新增',