= 0 ? intval($_POST['bugFileCheckTimer']) : 0; $ICEcoder["bugFileMaxLines"] = intval($_POST['bugFileMaxLines']); $ICEcoder["githubAuthToken"] = strClean($_POST['githubAuthToken']); $settingsArray = array("root","checkUpdates","openLastFiles","updateDiffOnSave","languageUser","backupsKept","backupsDays","deleteToTmp","findFilesExclude","codeAssist","visibleTabs","lockedNav","tagWrapperCommand","autoComplete","password","bannedFiles","bannedPaths","allowedIPs","autoLogoutMins","theme","fontSize","lineWrapping","lineNumbers","showTrailingSpace","matchBrackets","autoCloseTags","autoCloseBrackets","indentWithTabs","indentAuto","indentSize","pluginPanelAligned","bugFilePaths","bugFileCheckTimer","bugFileMaxLines","githubAuthToken"); $settingsNew = ""; for ($i=0;$i '; // Wrap certain values in double quotes $settingWrap = $settingsArray[$i]=="root"||$settingsArray[$i]=="password"||$settingsArray[$i]=="languageUser"||$settingsArray[$i]=="theme"||$settingsArray[$i]=="fontSize"||$settingsArray[$i]=="tagWrapperCommand"||$settingsArray[$i]=="autoComplete"||$settingsArray[$i]=="pluginPanelAligned"||$settingsArray[$i]=="githubAuthToken" ? '"' : ''; $settingsNew .= $settingWrap.$ICEcoder[$settingsArray[$i]].$settingWrap.','.PHP_EOL; } // Compile our new settings $settingsContents = substr($settingsContents,0,$repPosStart).$settingsNew.substr($settingsContents,($repPosEnd),strlen($settingsContents)); // Now update the config file if (is_writeable($settingsFile)) { $fh = fopen($settingsFile, 'w'); fwrite($fh, $settingsContents); fclose($fh); } 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 true,','"multiUser" => '.$isMultiUser.',',$generalSettingsContents); $generalSettingsContents = str_replace('"multiUser" => false,','"multiUser" => '.$isMultiUser.',',$generalSettingsContents); $isEnableRegistration = isset($_POST['enableRegistration']) && $_POST['enableRegistration'] ? "true" : "false"; $generalSettingsContents = str_replace('"enableRegistration" => true','"enableRegistration" => '.$isEnableRegistration,$generalSettingsContents); $generalSettingsContents = str_replace('"enableRegistration" => false','"enableRegistration" => '.$isEnableRegistration,$generalSettingsContents); if (is_writeable($configSettings)) { $fConfigSettings = fopen($configSettings, 'w'); fwrite($fConfigSettings, $generalSettingsContents); fclose($fConfigSettings); } else { echo ""; } $githubAuthTokenSet = $ICEcoder["githubAuthToken"] != "" ? "true" : "false"; // If we've changed langugage, 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(" ","",strClean($_POST['bugFilePaths'])))."']"; echo ""; }