mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Only set top.docRoot and top.iceRoot from index.php
Avoids having something output to the browser in places where we don't want it, such as the new file-control-xhr.php file. Temporary console.log for now as reminder to finish checking this out.
This commit is contained in:
@@ -98,8 +98,8 @@ $_SESSION['username'] = $_SESSION['username'];
|
||||
$serverType = stristr($_SERVER['SERVER_SOFTWARE'], "win") ? "Windows" : "Linux";
|
||||
$docRoot = rtrim(str_replace("\\","/",$ICEcoder['docRoot']));
|
||||
$iceRoot = rtrim(str_replace("\\","/",$ICEcoder["root"]));
|
||||
if ($_SESSION['loggedIn']) {
|
||||
echo "<script>top.docRoot='".$docRoot."';top.iceRoot='".$iceRoot."'</script>";
|
||||
if ($_SESSION['loggedIn'] && basename($_SERVER['SCRIPT_NAME']) == "index.php") {
|
||||
echo "<script>console.log('".basename($_SERVER['SCRIPT_NAME'])."');top.docRoot='".$docRoot."';top.iceRoot='".$iceRoot."'</script>";
|
||||
}
|
||||
|
||||
// Establish the dir ICEcoders running from
|
||||
|
||||
Reference in New Issue
Block a user