turnOffTutorialOnLogin($settingsFile)) { $ICEcoder['tutorialOnLogin'] = false; } else { echo ""; } exit; } $currentSettings = $settingsClass->getConfigUsersSettings($settingsFile); // Has there been a language change? $languageUserChanged = $ICEcoder['languageUser'] != $_POST['languageUser']; // Prepare all our vars $updatedSettings = [ "versionNo" => $currentSettings['versionNo'], "licenseEmail" => $currentSettings['licenseEmail'], "licenseCode" => $currentSettings['licenseCode'], "configCreateDate" => $currentSettings['configCreateDate'], "root" => xssClean($_POST['root'], "html"), "checkUpdates" => isset($_POST['checkUpdates']) && $_POST['checkUpdates'], "openLastFiles" => isset($_POST['openLastFiles']) && $_POST['openLastFiles'], "updateDiffOnSave" => isset($_POST['updateDiffOnSave']) && $_POST['updateDiffOnSave'], "languageUser" => $_POST['languageUser'], "backupsKept" => isset($_POST['backupsKept']) && $_POST['backupsKept'], "backupsDays" => intval($_POST['backupsDays']), "deleteToTmp" => isset($_POST['deleteToTmp']) && $_POST['deleteToTmp'], "findFilesExclude" => explode(",", str_replace(" ", "", $_POST['findFilesExclude'])), "codeAssist" => isset($_POST['codeAssist']) && $_POST['codeAssist'], "visibleTabs" => isset($_POST['visibleTabs']) && $_POST['visibleTabs'], "lockedNav" => isset($_POST['lockedNav']) && $_POST['lockedNav'], "tagWrapperCommand" => $_POST['tagWrapperCommand'], "autoComplete" => $_POST['autoComplete'], "password" => $currentSettings['password'], "bannedFiles" => explode(",", str_replace(" ", "", $_POST['bannedFiles'])), "bannedPaths" => explode(",", str_replace(" ", "", $_POST['bannedPaths'])), "allowedIPs" => explode(",", str_replace(" ", "", $_POST['allowedIPs'])), "autoLogoutMins" => intval($_POST['autoLogoutMins']), "theme" => $_POST['theme'], "fontSize" => $_POST['fontSize'], "lineWrapping" => $_POST['lineWrapping'], "lineNumbers" => $_POST['lineNumbers'], "showTrailingSpace" => $_POST['showTrailingSpace'], "matchBrackets" => $_POST['matchBrackets'], "autoCloseTags" => $_POST['autoCloseTags'], "autoCloseBrackets" => $_POST['autoCloseBrackets'], "indentType" => $_POST['indentType'], "indentAuto" => $_POST['indentAuto'], "indentSize" => intval($_POST['indentSize']), "pluginPanelAligned" => $_POST['pluginPanelAligned'], "scrollbarStyle" => $_POST['scrollbarStyle'], "bugFilePaths" => explode(",", str_replace(" ", "", $_POST['bugFilePaths'])), "bugFileCheckTimer" => intval($_POST['bugFileCheckTimer']) >= 0 ? intval($_POST['bugFileCheckTimer']) : 0, "bugFileMaxLines" => intval($_POST['bugFileMaxLines']), "plugins" => $currentSettings['plugins'], "ftpSites" => $currentSettings['ftpSites'], "tutorialOnLogin" => isset($_POST['tutorialOnLogin']) && $_POST['tutorialOnLogin'], "tipsOnLogin" => isset($_POST['tipsOnLogin']) && $_POST['tipsOnLogin'], "previousFiles" => $currentSettings['previousFiles'], "last10Files" => $currentSettings['last10Files'], "favoritePaths" => $currentSettings['favoritePaths'], ]; if ($_POST['password']!="") {$updatedSettings["password"] = generateHash($_POST['password']);}; $ICEcoder = array_merge($ICEcoder, $updatedSettings); // Now update the config file if (is_writeable("../data/".$settingsFile)) { $settingsClass->setConfigUsersSettings($settingsFile, $updatedSettings); } else { echo ""; } // OK, now the config file has been updated, update our current session with new arrays $settingsArray = array("findFilesExclude", "bannedFiles", "allowedIPs"); for ($i = 0; $i getConfigGlobalSettings(); $ICEcoderSettingsFromFile['multiUser'] = isset($_POST['multiUser']) && $_POST['multiUser']; $ICEcoderSettingsFromFile['enableRegistration'] = isset($_POST['enableRegistration']) && $_POST['enableRegistration']; $settingsClass->setConfigGlobalSettings($ICEcoderSettingsFromFile); // If we've changed language, reload ICEcoder now if ($languageUserChanged) { echo ''; die('Reloading ICEcoder after language change'); } // With all that worked out, we can now hide the settings screen and apply the new settings $jsBugFilePaths = "['" . str_replace(",", "','", str_replace(" ", "", $_POST['bugFilePaths'])) . "']"; echo ""; }