Commit d3b40c08 authored by Eric - kg6wxc's avatar Eric - kg6wxc
Browse files

Merge branch 'loadDefaultSettingsFirst' into 'master'

load the default user-settings.ini file

See merge request !32
parents 56780b1c e9cf645a
......@@ -43,9 +43,14 @@ ini_set('memory_limit', '128M');
$INCLUDE_DIR = "..";
//check for users user-settings.ini file and use it if it exists
//inform the user and exit if the file does not exist
global $USER_SETTINGS;
//load the default ini file 1st, later user-settings and custom settings will override these.
if (file_exists($INCLUDE_DIR . "/scripts/user-settings.ini-default")) {
$USER_SETTINGS = parse_ini_file($INCLUDE_DIR . "/scripts/user-settings.ini-default");
}
//check for users user-settings.ini file and use it if it exists
//inform the user and exit if the file does not exist.
if (file_exists($INCLUDE_DIR . "/scripts/user-settings.ini")) {
$USER_SETTINGS = parse_ini_file($INCLUDE_DIR . "/scripts/user-settings.ini");
}else {
......
......@@ -50,9 +50,14 @@ header("Expires: 0");
$INCLUDE_DIR = "..";
global $USER_SETTINGS;
//load the default ini file 1st, later user-settings and custom settings will override these.
if (file_exists($INCLUDE_DIR . "/scripts/user-settings.ini-default")) {
$USER_SETTINGS = parse_ini_file($INCLUDE_DIR . "/scripts/user-settings.ini-default");
}
//check for users user-settings.ini file and use it if it exists
//use the default one if it does not
global $USER_SETTINGS;
if (file_exists($INCLUDE_DIR . "/scripts/user-settings.ini")) {
$USER_SETTINGS = parse_ini_file($INCLUDE_DIR . "/scripts/user-settings.ini");
}else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment