Browse Source

config changes

remotes/r4jeshwar/master
Go Johansson 5 months ago
parent
commit
edfde395f6
  1. 11
      dist.json
  2. 4
      static/php/includes/Core.namespace.php

11
dist.json

@ -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"
]
}

4
static/php/includes/Core.namespace.php

@ -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'];

Loading…
Cancel
Save