diff --git a/lib/settings.php b/lib/settings.php index 6d5fd9a..2cc4818 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -43,7 +43,7 @@ $lastOpenedFiles = ""; // Update this settings file? -if ($_POST["theme"] && $_SESSION['userLevel'] == 10) { +if (isset($_POST["theme"]) && $_POST["theme"] && $_SESSION['userLevel'] == 10) { $settingsFile = 'settings.php'; $settingsContents = file_get_contents($settingsFile); // Replace our lastOpenedFiles var with the the current @@ -97,7 +97,7 @@ if ($_POST["theme"] && $_SESSION['userLevel'] == 10) { } // Save the currently opened files for next time -if ($_GET['saveFiles']) { +if (isset($_GET["saveFiles"]) && $_GET['saveFiles']) { if ($_SESSION['userLevel'] == 10) { $settingsFile = 'settings.php'; $settingsContents = file_get_contents($settingsFile); @@ -144,9 +144,9 @@ if ($shortURLStarts[count($shortURLStarts)-1]!="") {$trimArray=1;} else {$trimAr $shortURLStarts = $shortURLStarts[count($shortURLStarts)-$trimArray]; // If we're updating or calling from the index.php page, do/redo plugins & last opened files -if (($_POST["theme"] && $_SESSION['userLevel'] == 10) || strpos($_SERVER['PHP_SELF'],"index.php")>0) { +if ((isset($_POST["theme"]) && $_POST["theme"] && $_SESSION['userLevel'] == 10) || strpos($_SERVER['PHP_SELF'],"index.php")>0) { // If we're updating, we need to recreate the plugins array - if ($_POST["theme"] && $_SESSION['userLevel'] == 10) { + if (isset($_POST["theme"]) && $_POST["theme"] && $_SESSION['userLevel'] == 10) { $plugins = array(); $pluginsArray = explode("====================",str_replace("\"","",str_replace("\r","",str_replace("\n","",$_POST['plugins'])))); for ($i=0;$itop.document.getElementById('pluginsContainer').innerHTML = '".$pluginsDisplay."';"; } @@ -175,7 +175,7 @@ if (($_POST["theme"] && $_SESSION['userLevel'] == 10) || strpos($_SERVER['PHP_SE }; // If we're updating our settings, clear existing setIntervals & the array refs, then start new ones - if ($_POST["theme"] && $_SESSION['userLevel'] == 10) { + if (isset($_POST["theme"]) && $_POST["theme"] && $_SESSION['userLevel'] == 10) { ?>