From 568cb08e4a6391bb145e2013e67db553b113d84e Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Tue, 3 Sep 2013 08:10:21 +0100 Subject: [PATCH] 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. --- lib/settings.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/settings.php b/lib/settings.php index a72357b..f3f1c49 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -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