mirror of
https://github.com/tznb1/TwoNav.git
synced 2025-08-10 08:51:49 +00:00
v2.0.14-20230420
This commit is contained in:
23
system/MySQL/20230420.php
Normal file
23
system/MySQL/20230420.php
Normal 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']);
|
||||
@@ -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`;
|
||||
|
||||
Reference in New Issue
Block a user