v2.0.14-20230420

This commit is contained in:
MI15\Win
2023-04-20 21:03:34 +08:00
parent 5cae5af159
commit 87566c39f3
13 changed files with 91 additions and 50 deletions

23
system/MySQL/20230420.php Normal file
View File

@@ -0,0 +1,23 @@
<?php if(!defined('DIR')){header('HTTP/1.1 404 Not Found');header("status: 404 Not Found");exit;}
//弥补主题配置目录名相同造成的窜数据的bug
//复制主题配置,并重新标记t类型
// 'theme_home','theme_login','theme_transit','theme_register';
$datas = select_db('user_config','*',['t'=>'theme']);
foreach ($datas as $data) {
$name = $data['k'];
unset($data['id']);
if($name == 'default'){
$data['t'] = 'theme_transit';
insert_db('user_config',$data);
}
if($name == 'WebStack-Hugo'){
$data['t'] = 'theme_transit';
insert_db('user_config',$data);
}
$data['t'] = 'theme_home';
insert_db('user_config',$data);
}
insert_db('updatadb_logs',['file_name'=>$file_name,'update_time'=>time(),'status'=>'TRUE','extra'=>'']);
delete_db('user_config',['t'=>'theme']);

View File

@@ -42,7 +42,8 @@ CREATE TABLE IF NOT EXISTS `updatadb_logs` (
UNIQUE KEY `file_name` (`file_name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
INSERT INTO "updatadb_logs" ("id", "file_name", "update_time", "status", "extra") VALUES ('1', '20230417.php', '1681719049', 'TRUE', '');
INSERT INTO "updatadb_logs" ("file_name", "update_time", "status", "extra") VALUES ('20230417.php', '1681719049', 'TRUE', '');
INSERT INTO "updatadb_logs" ("file_name", "update_time", "status", "extra") VALUES ('20230420.php', '1681977368', 'TRUE', '');
-- 创建用户表
DROP TABLE IF EXISTS `global_user`;