From f81ea9fe57d7a1f6485dd1898e3a5aa5f8d3f9c7 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Fri, 27 Jul 2012 12:17:39 +0100 Subject: [PATCH] settings include, Inclusion of settings.php moved to start to be like other PHP files docRoot replaces $_SERVER equivalent $path now gone in favour of specifying the file path chunks we need Simplification in a few areas that previously used $path Other areas of code also simplified for clarity All file refs (links, ids etc) now relaitive to doc root. This means less code and doesn't expose full server paths which is a good security tweak. --- files.php | 49 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/files.php b/files.php index 29faa95..4cce7ab 100644 --- a/files.php +++ b/files.php @@ -1,8 +1,9 @@ + -ICEcoder File Manager +ICEcoder file manager @@ -11,10 +12,9 @@
getPathname(), strlen($path)); + $fileFolderName = substr($objectRef->getPathname(), strlen($docRoot.$iceRoot)); $canAdd = true; for ($i=0;$igetFilename()!="." && $objectRef->getFilename()!=".." && $fileFolderName[strlen($fileFolderName)-1]!="/" && $canAdd) { - $fileFolderName!="/" && is_dir($path.$fileFolderName) ? array_push($finalArray,$fileFolderName) : array_push($tempArray,$fileFolderName); + $fileFolderName!="/" && is_dir($docRoot.$iceRoot.$fileFolderName) ? array_push($finalArray,$fileFolderName) : array_push($tempArray,$fileFolderName); } } @@ -78,15 +77,15 @@ for ($i=0;$i'; } echo "\n\n"; echo "\n"; + echo ";\n\n"; ?>