mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Allow settings to be called from root or a dir
By doing this we don't end up with a lib/lib path issue Used longhand if else statement instead of ternary for clarity Also added die to stop it going any further and having a new header location replace this one
This commit is contained in:
@@ -321,7 +321,13 @@ if ($_SESSION['loggedIn']) {
|
||||
}
|
||||
|
||||
if ((!$_SESSION['loggedIn'] || $ICEcoder["password"] == "") && !strpos($_SERVER['SCRIPT_NAME'],"lib/settings.php")) {
|
||||
header('Location: lib/settings.php');
|
||||
if (file_exists('settings.php')) {
|
||||
header('Location: settings.php');
|
||||
die();
|
||||
} else {
|
||||
header('Location: lib/settings.php');
|
||||
die();
|
||||
}
|
||||
// If we're due to show the settings screen
|
||||
} elseif (!$_SESSION['loggedIn']) {
|
||||
// If the password hasn't been set and we're setting it
|
||||
|
||||
Reference in New Issue
Block a user