Moved huge chunks of isolated code to their own files
Reordered and improved remaining code
Lots of die messages added to stop code continuing after a header
location
!loginRequired now also setting loggedIn = true as demoMode does
Boot user to new login page instead of back to this page
loginRequired added to final elseif condition
Added 2 big notes re probably showing he login screen and continuing
with what we're doing
Because we may include this file from a couple of dirs and I'd rather it
continued to be run from lib/settings.php. By doing it this way round,
we're ensuring this, as lib/lib/settings.php won't exist.
By doing this we don't end up with a lib/lib path issue
Used longhand if else statement instead of ternary for clarity
Also added die to stop it going any further and having a new header
location replace this one
Increase salt from 9 to 12 chars to move along with technology
Replace all backslashes with 2. This means we escape PHP and then JS to
ensure we will maintain \n instead of ending up with a line break
Don't display errors, just silently log them
Don't produce warnings if we can't session_start due to headers already
being sent
Test if the mb_detect_encoding function exists before using
$configSettings is a seperate file now, containing the array of settings
we have buried in this file
Renamed user template, so change of filename here
Also using $configUsersTemplate to be clearer about things
To make things simpler, everything is now just called password rather
than accountPassword etc
settings.php also now gone back to checking for the existance of the
$_POST password rather than looking for a submit button named 'set
password'. This obviously wouldn't work as that's not the name of the
button on the settings screen, it's 'update'
On logout event, include that process
Settings template file is now config___template.php
Create new if statement for login success and fail, plus run processes
for each event
On new user setup, run that process
If multiUser, always show the checkUpdates box as we don't know if we're
setting up a new user or logging in, so have to assume it's a new user
and allow this setting to show
Session accountUsername is now just username
Settings filename now may contain the username if available from a post
or session var
setPWorLogin is now login by default, set password if we create a new
config file
Instead of the posted accountPassword value, we now look to the value of
the submit button and if it contains 'set password' or not
Set session username to the posted value on login or set password and
set to itself on every load
accountPassword form field now just password
Focus on the username or password field, depending on the 1st one shown
on page
Set the value of the submit button to 'set password / login' if
multiUser
Add a context array to all instances of file_get_contents(). This is so
we don't end up with a timeout too early if the system is set to
something short (ie, 15 secs) and we try to open a large file that takes
longer than this short limit.
Config filename now also includes server name (domain and subdomains).
This means you can end up with different config files depending on where
ICEcoder is being used, such as config-localhost.php,
config-mydomain_com.php, config-dev_mydomain_com.php etc.
Also now using CodeMirror 3.13
Extra CodeMirror object child level needs to be checked too plus put
into dev mode until I resolve 2nd eval issue on renaming file (occurs in
.min.js file)
New setting for devMode. If true it will use the unminified ice-coder.js
file, otherwise the min.js version
Copy option now available for multple file copying, outside of single
menu items. Paste option moved next to it.
If magic quotes gpc is still on, the server has this set and the php.ini
file hasn't been able to turn it off. This section will remove the extra
slashes set by it to return the content back to normal.
Font size is now saved to the config file on update from settings screen
and also applied on the fly to currently open docs.
tabWidth is now indentSize
indentWithTabs is a new setting which can be true/false (false means
spaces)
Applied immediately after updating on settings screen