mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Check if lib/settings.php exists first
Because we may include this file from a couple of dirs and I'd rather it continued to be run from lib/settings.php. By doing it this way round, we're ensuring this, as lib/lib/settings.php won't exist.
This commit is contained in:
@@ -321,11 +321,11 @@ if ($_SESSION['loggedIn']) {
|
||||
}
|
||||
|
||||
if ((!$_SESSION['loggedIn'] || $ICEcoder["password"] == "") && !strpos($_SERVER['SCRIPT_NAME'],"lib/settings.php")) {
|
||||
if (file_exists('settings.php')) {
|
||||
header('Location: settings.php');
|
||||
if (file_exists('lib/settings.php')) {
|
||||
header('Location: lib/settings.php');
|
||||
die();
|
||||
} else {
|
||||
header('Location: lib/settings.php');
|
||||
header('Location: settings.php');
|
||||
die();
|
||||
}
|
||||
// If we're due to show the settings screen
|
||||
|
||||
Reference in New Issue
Block a user