From d7d483ef9cdad7492f5960a8b7b9fc5f796908a6 Mon Sep 17 00:00:00 2001 From: aharris88 Date: Fri, 1 Feb 2013 11:25:13 -0600 Subject: [PATCH] Fix header issue #146 --- index.php | 3 +-- lib/settings.php | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index 9728584..0f25bc7 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,3 @@ - - + ICEcoder v <?php echo $ICEcoder["versionNo"];?> diff --git a/lib/settings.php b/lib/settings.php index b6dfb45..af0b52b 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -232,6 +232,9 @@ if ($_SESSION['loggedIn']) { $onLoadExtras .= ";top.ICEcoder.content.style.visibility='visible'"; } +if ((!$_SESSION['loggedIn'] || $ICEcoder["accountPassword"] == "") && !strpos($_SERVER['SCRIPT_NAME'],"lib/settings.php")) { + header('Location: lib/settings.php'); +} // If we're due to show the settings screen if (!$_SESSION['loggedIn']) { // If the password hasn't been set and we're setting it @@ -285,8 +288,4 @@ echo $ICEcoder["accountPassword"] == "" ? "Setup" : "Login"; \ No newline at end of file