mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
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:
@@ -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) {
|
||||
|
||||
@@ -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;};
|
||||
|
||||
Reference in New Issue
Block a user