Updated JSON to MIT

Cleaned up sanity.php
Cleaning up random bugs and cretura
This commit is contained in:
Michał Gdula 2022-11-06 16:31:22 +00:00
parent 5da0da06fd
commit c9b81414b0
10 changed files with 251 additions and 242 deletions

View file

@ -10,14 +10,19 @@
*/
if (is_file(__DIR__."/../usr/conf/conf.json")) {
$user_settings = json_decode(file_get_contents(__DIR__."/../usr/conf/conf.json"), true);
if (is_file(__DIR__."/../usr/conf/msg.json")) {
$user_welcome = json_decode(file_get_contents(__DIR__."/../usr/conf/msg.json"), true)['welcome'];
}
} elseif (is_file(__DIR__."/../usr/conf/manifest.json")) {
$user_settings = json_decode(file_get_contents(__DIR__."/../usr/conf/manifest.json"), true);
$user_welcome = $user_settings['welcome_msg'];
} elseif (is_file(__DIR__."/manifest.json")) {
$user_settings = json_decode(file_get_contents(__DIR__."/manifest.json"), true);
$user_welcome = $user_settings['welcome_msg'];
} else {
$user_settings = json_decode(file_get_contents(__DIR__."/../usr/conf.default.json"), true);
}
if (is_file(__DIR__."/../usr/conf/msg.json")) {
$user_welcome = json_decode(file_get_contents(__DIR__."/../usr/conf/msg.json"), true);
$user_welcome = $user_welcome['welcome'];
}
$web_info = json_decode(file_get_contents(__DIR__."/gallery.json"), true);
$upload_conf = $user_settings['upload'];