mirror of
https://github.com/mashirozx/sakura.git
synced 2024-12-12 09:54:35 +08:00
fix: fix #182,#170
This commit is contained in:
parent
680d3b515f
commit
978937bb90
@ -1879,8 +1879,8 @@ function create_sakura_table()
|
||||
$wpdb->insert($sakura_table_name, $privkey);
|
||||
}
|
||||
//reduce sql query
|
||||
$sakura_image_array = $wpdb->get_var("SELECT `mate_value` FROM `wp_sakura` WHERE `mate_key`='manifest_json'");
|
||||
$sakura_privkey = $wpdb->get_var("SELECT `mate_value` FROM `wp_sakura` WHERE `mate_key`='privkey'");
|
||||
$sakura_image_array = $wpdb->get_var("SELECT `mate_value` FROM $sakura_table_name WHERE `mate_key`='manifest_json'");
|
||||
$sakura_privkey = $wpdb->get_var("SELECT `mate_value` FROM $sakura_table_name WHERE `mate_key`='privkey'");
|
||||
}
|
||||
add_action('after_setup_theme', 'create_sakura_table');
|
||||
|
||||
|
@ -399,8 +399,8 @@ function update_database() {
|
||||
"mate_value" => date("Y-m-d H:i:s",time())
|
||||
);
|
||||
|
||||
$wpdb->query("DELETE FROM `wp_sakura` WHERE `mate_key` ='manifest_json'");
|
||||
$wpdb->query("DELETE FROM `wp_sakura` WHERE `mate_key` ='json_time'");
|
||||
$wpdb->query("DELETE FROM $sakura_table_name WHERE `mate_key` ='manifest_json'");
|
||||
$wpdb->query("DELETE FROM $sakura_table_name WHERE `mate_key` ='json_time'");
|
||||
$wpdb->insert($sakura_table_name,$manifest);
|
||||
$wpdb->insert($sakura_table_name,$time);
|
||||
$output = "manifest.json has been stored into database.";
|
||||
|
Loading…
Reference in New Issue
Block a user