From e4e9217d844c75eb8e6dda8213b1a018c0277ed6 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Fri, 13 Jul 2012 18:05:28 +0100 Subject: [PATCH] Putting server vars into $ICEcoder array All server variables such as codeMirrorDir, visibleTabs etc now in $ICEcoder array This is so we have a single object to contain all settings, just like the JS equivalent --- editor.php | 20 ++--- files.php | 12 +-- index.php | 20 ++--- lib/config.php | 42 ++++++----- lib/file-control.php | 4 +- lib/file-folder-properties.php | 2 +- lib/help.php | 2 +- lib/multiple-results.php | 2 +- lib/settings-screen.php | 56 +++++++------- lib/settings.php | 131 +++++++++++++++++---------------- 10 files changed, 147 insertions(+), 144 deletions(-) diff --git a/editor.php b/editor.php index 4b7ab01..51919c4 100644 --- a/editor.php +++ b/editor.php @@ -5,17 +5,17 @@ CodeMirror 2: ICE Coders Editor of Choice - +/lib/codemirror.css"> - - - - + + + + '; } else { - echo ''; + echo ''; } ?> @@ -48,9 +48,9 @@ span.CodeMirror-matchhighlight {background: #555} echo '
'.PHP_EOL; echo '

files

'.PHP_EOL; echo 'Last 10 files opened:
'.PHP_EOL; - $last10FilesArray = explode(",",$last10Files); + $last10FilesArray = explode(",",$ICEcoder["last10Files"]); for ($i=0;$i
'; } else { echo ''; diff --git a/files.php b/files.php index b8bb54b..47ba4ef 100644 --- a/files.php +++ b/files.php @@ -12,8 +12,8 @@ getPathname(), strlen($path)),".."); $canAdd = true; - for ($i=0;$igetFilename()!="." && $fileFolderName[strlen($fileFolderName)-1]!="/" && $canAdd) { $fileFolderName!="/" && is_dir($path.$fileFolderName) ? array_push($finalArray,$fileFolderName) : array_push($tempArray,$fileFolderName); @@ -101,8 +101,8 @@ for ($i=0;$itop.ICEcoder.message(\'ICEcoder '.$ICEcoderLatestVer.' now released\n\nPlease upgrade\');'; } else { $cMLatestVer = json_encode(file_get_contents("http://codemirror.net/latest-version.txt")); $cMLatestVer = rtrim(ltrim($cMLatestVer,"\""),"\"\\n"); - if ($cMThisVer<$cMLatestVer) { + if ($ICEcoder["cMThisVer"]<$cMLatestVer) { echo ''; } } @@ -29,14 +29,14 @@ if ($checkUpdates) { -ICE Coder - <?php echo $versionNo;?> +ICE Coder - <?php echo $ICEcoder["versionNo"];?> +/lib/codemirror.css"> + '.PHP_EOL; + echo ''.PHP_EOL; } ?> @@ -30,7 +30,7 @@ for ($i=0;$i -
+

git:
@@ -38,11 +38,11 @@ for ($i=0;$i
codemirror dir:
- +

codemirror version:
- +

doc root:
@@ -72,18 +72,18 @@ for ($i=0;$i

settings

functionality

-> tab indents selection
-> check for updates on load
-> auto open last files on login
+> tab indents selection
+> check for updates on load
+> auto open last files on login

when finding in files, exclude:
-
+">

assisting

-> code assist
-> visible tabs
-> locked nav
+> code assist
+> visible tabs
+> locked nav

security

@@ -93,29 +93,29 @@ confirm password


restricted files/folders
-
+">
banned files/folders
-
+">

ip addresses
-
+">

plugins

plugins array name, img src, style, url, target, setInterval (mins)