mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
User settings carry version no & clear on upgrade
versionNo also added to user settings array Check this against system and on mismatch, rename .old and reload to create new settings file
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
$ICEcoderUserSettings = array(
|
||||
"versionNo" => "3.0 beta",
|
||||
"root" => "",
|
||||
"checkUpdates" => true,
|
||||
"openLastFiles" => true,
|
||||
|
||||
@@ -101,6 +101,12 @@ if (!file_exists(dirname(__FILE__)."/".$settingsFile)) {
|
||||
}
|
||||
include(dirname(__FILE__)."/".$settingsFile);
|
||||
|
||||
// On mismatch of settings file to system, rename to .old and reload
|
||||
If ($ICEcoderUserSettings["versionNo"] != $ICEcoderSettings["versionNo"]) {
|
||||
rename(dirname(__FILE__)."/".$settingsFile,dirname(__FILE__)."/".str_replace(".php",".old",$settingsFile));
|
||||
header("Location: settings.php");
|
||||
}
|
||||
|
||||
// Join ICEcoder settings and user settings together to make our final ICEcoder array
|
||||
$ICEcoder = $ICEcoderSettings + $ICEcoderUserSettings;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user