serverType defined in settings and in a beter way

Instead of detecting a : in the path, now detect by server software name
This is now being done in settings file so it can be used elsewhere too
This commit is contained in:
Matt Pass
2012-08-30 07:58:07 +01:00
parent 1cd1529e28
commit 24fe2bb81e
2 changed files with 1 additions and 1 deletions

View File

@@ -14,7 +14,6 @@
<?php
$ICEcoder["restrictedFiles"] = $_SESSION['restrictedFiles'];
$ICEcoder["bannedFiles"] = $_SESSION['bannedFiles'];
$serverType = strrpos($docRoot,":") ? "Windows" : "Linux";
// Function to sort given values alphabetically
function alphasort($a, $b) {

View File

@@ -89,6 +89,7 @@ if (isset($_POST["theme"]) && $_POST["theme"] && $_SESSION['userLevel'] == 10) {
// Define the docRoot & iceRoot
$docRoot = rtrim(str_replace("\\","/",$_SERVER['DOCUMENT_ROOT']));
$iceRoot = rtrim(str_replace("\\","/",$ICEcoder["root"]));
$serverType = stristr($_SERVER[SERVER_SOFTWARE], "win") ? "Windows" : "Linux";
// Establish our user level
if (!isset($_SESSION['userLevel'])) {$_SESSION['userLevel'] = 0;};