Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
No JS output before DOCTYPE, fix path for required file
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpass committed Jun 25, 2022
1 parent 4ac0f0b commit 7001178
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
?>">
<link rel="icon" type="image/png" href="<?php echo $settingsClass->assetsRoot;?>/images/favicon.png">
<script>
docRoot = "<?php echo $ICEcoder['docRoot']; ?>";
iceRoot = "<?php echo $ICEcoder['root']; ?>";

window.onbeforeunload = function() {
Expand Down
2 changes: 1 addition & 1 deletion lib/icecoder.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
// Classes
require_once dirname(__FILE__)."../classes/_ExtraProcesses.php";
require_once dirname(__FILE__)."/../classes/_ExtraProcesses.php";
require_once dirname(__FILE__)."/../classes/Backup.php";
require_once dirname(__FILE__)."/../classes/File.php";
require_once dirname(__FILE__)."/../classes/Settings.php";
Expand Down
3 changes: 0 additions & 3 deletions lib/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,6 @@
$serverType = $systemClass->getOS();
$docRoot = rtrim(str_replace("\\", "/", $ICEcoder['docRoot']));
$iceRoot = rtrim(str_replace("\\", "/", $ICEcoder["root"]));
if ($_SESSION['loggedIn'] && "index.php" === basename($_SERVER['SCRIPT_NAME'])) {
echo "<script>docRoot = '" . $docRoot . "'; iceRoot='" . $iceRoot . "'</script>";
}

// Establish the dir ICEcoders running from
$ICEcoderDirFullPath = rtrim(str_replace("\\", "/", dirname($_SERVER['SCRIPT_FILENAME'])), "/lib");
Expand Down

0 comments on commit 7001178

Please sign in to comment.