From cc7887d452bd24b93924f871fe690607620712e3 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Mon, 25 Jun 2012 07:14:52 +0100 Subject: [PATCH] $docRoot now defined here --- lib/settings.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/settings.php b/lib/settings.php index b40c961..39d9112 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -25,6 +25,9 @@ function numClean($var) { // Settings are stored in this file include("config.php"); +$docRoot = str_replace("\\","/",$_SERVER['DOCUMENT_ROOT']); +if (strrpos($docRoot,"/")==strlen($docRoot)-1) {$docRoot = substr($docRoot,0,strlen($docRoot)-1);}; + // Update this config file? if (isset($_POST["theme"]) && $_POST["theme"] && $_SESSION['userLevel'] == 10) { $settingsFile = 'config.php';