config changes

This commit is contained in:
Go Johansson 2022-01-22 17:30:04 +01:00
parent 86f819edee
commit edfde395f6
2 changed files with 9 additions and 6 deletions

View File

@ -28,14 +28,14 @@
"bitcoinAddress": "",
"flattrUrl": "",
"DB_MODE": "sqlite",
"DB_PATH": "/Users/go.johansson/PERSONAL_REPOS/Uguu/uguu.sq3",
"DB_PATH": "/var/www/db/uguu.sq3",
"DB_USER": "NULL",
"DB_PASS": "NULL",
"LOG_IP": true,
"LOG_IP": false,
"ANTI_DUPE": false,
"BLACKLIST_DB": true,
"FILTER_MODE": true,
"FILES_ROOT": "/Users/go.johansson/PERSONAL_REPOS/Uguu/dist/files/",
"FILES_ROOT": "/var/www/files/",
"FILES_RETRIES": 15,
"SSL": "true",
"URL": "a.uguu.se",
@ -68,6 +68,9 @@
],
"DOUBLE_DOTS": [
"tar.gz",
"tar.cp"
"tar.bz",
"tar.bz2",
"tar.xz",
"user.js"
]
}

View File

@ -61,12 +61,12 @@ namespace Core {
*/
public static function loadConfig()
{
if (!file_exists('/Users/go.johansson/PERSONAL_REPOS/Uguu/dist.json')) {
if (!file_exists('/var/www/uguu/dist.json')) {
throw new Exception('Cant read settings file.', 500);
}
try {
$settings_array = json_decode(
file_get_contents('/Users/go.johansson/PERSONAL_REPOS/Uguu/dist.json'),
file_get_contents('/var/www/uguu/dist.json'),
true
);
self::$DB_MODE = $settings_array['DB_MODE'];