New options available to set in the settings screen
Also passes through to useNewSettings function for in session changes
A couple of other minor changes to style and layout
demoMode bool added to ICEcoder array, false by default
If set to true and we have a password, set logginIn to true
$demoMode var equivalent to array var
demoMode must be false to possibly allow saving
You need to set a default timezone for PHP 5.3.0 and onwards. Using
functions such as date without that throws up a warning. However,
getting it from the server causes a warning too. So, I'm getting and
setting it whilst also supressing the warning with @.
Ended config.php write problem messages with 'and press refresh'
No need to set visibility on load anymore as we can only see if logged
in, so should be visible anyway
Removed tabs from login & set password screen (gives clue it's in an if
condition)
You cannot get access to ICEcoder unless you have logged in, so
restrictedFiles is not needed anymore
Removed it and all instances of it's usage
Only updating pluginsContainer if it's a DOM elem
Change title tag of login/set password screen conditionally
Big set of changes so that you only see a login screen until you're
logged in
Upon receiving a good login password attempt, also now immeditaley
redirect after setting session var
Rearranged a few chunks of code to logically make more sense
SImplified quite a few things by condensing code
Now shows a login/set password screen
Prior to showing this though, if we're setting a password and once
hasn't been set yet, do that and redirect
If we're not logged in or don't have a password plus not on the settings
file, redirect to that to login or set password
Moving away from the idea of multiple user levels, users will either
have full access or no access
Swapped all userLevel session vars to a loggedIn var, which is a bool
Makes things simpler and paves the way towards the new login screen
(before you see any files, code etc)
Removed 'v ' prefix from version number so it can be evaluated in
conditions easier
Hardcoded 'v ' before all places where the version number is shown
No longer need to ltrim 'v ' from the version number
Before saving the values, remove spaces from CSV values provided by user
Also covering the same thing in the 4 x session arrays & arrays that are
created
Only start a session if we haven't yet got a session object
(Avoids warnings from PHP)
Define our settingsFile, used in many places now
serverRoot gone, no longer needed (this is now docRoot)
Specify versionNo, codeMirrorDir & cMThisVer here now
(This means we don't overwrite users config settings each time we change
version no and they pull from Github, overwriting all their settings)
These 3 vars prefixed to the ICEcoder settings array
settingsNew now created from array & for loop, much simpler
Same for 4 session vars, created in similar way
docRoot & iceRoot now defined here
(As settings.php is loaded by just about every PHP file, they are now
available everywhere)
These, plus user level, security vars, IP address code moved to all be
together
settingsContents 1 & 2 now just settingsContents
saved files in previousFiles & last10Files now docRoot prefixed, making
them full paths to files
Clearer wording & other minor tweaks
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
This is because it replaces with HTML equivalents and causes problems
Variable is only updateable if you're logged in, so has reasonable
security
Will create a better solution in the future