mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-06 16:46:48 +01:00
scrollbarStyle setting added, remove GitHub setting
This commit is contained in:
@@ -47,21 +47,21 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
"indentAuto" => $_POST['indentAuto'],
|
||||
"indentSize" => intval($_POST['indentSize']),
|
||||
"pluginPanelAligned" => $_POST['pluginPanelAligned'],
|
||||
"scrollbarStyle" => $_POST['scrollbarStyle'],
|
||||
"bugFilePaths" => 'array("'.str_replace(',','","',str_replace(" ","",$_POST['bugFilePaths'])).'")',
|
||||
"bugFileCheckTimer" => intval($_POST['bugFileCheckTimer']) >= 0 ? intval($_POST['bugFileCheckTimer']) : 0,
|
||||
"bugFileMaxLines" => intval($_POST['bugFileMaxLines']),
|
||||
"githubAuthToken" => $_POST['githubAuthToken']
|
||||
"bugFileMaxLines" => intval($_POST['bugFileMaxLines'])
|
||||
]
|
||||
);
|
||||
|
||||
if ($_POST['password']!="") {$ICEcoder["password"] = generateHash($_POST['password']);};
|
||||
|
||||
$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");
|
||||
$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","scrollbarStyle","bugFilePaths","bugFileCheckTimer","bugFileMaxLines");
|
||||
$settingsNew = "";
|
||||
for ($i=0;$i<count($settingsArray);$i++) {
|
||||
$settingsNew .= '"'.$settingsArray[$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" ? '"' : '';
|
||||
$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]=="scrollbarStyle" ? '"' : '';
|
||||
|
||||
if ($settingsArray[$i]=="password") {
|
||||
$settingsNew .= str_replace("\$", "\\$", $settingWrap.$ICEcoder[$settingsArray[$i]].$settingWrap.','.PHP_EOL);
|
||||
@@ -113,8 +113,6 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
echo "<script>parent.parent.ICEcoder.message('".$t['Cannot update config']." data/".$configSettings." ".$t['and try again']."');</script>";
|
||||
}
|
||||
|
||||
$githubAuthTokenSet = $ICEcoder["githubAuthToken"] != "" ? "true" : "false";
|
||||
|
||||
// If we've changed langugage, reload ICEcoder now
|
||||
if ($languageUserChanged) {
|
||||
echo '<script>window.location = "../";</script>';
|
||||
@@ -123,5 +121,5 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
|
||||
// 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 "<script>parent.parent.ICEcoder.settingsScreen('hide');parent.parent.ICEcoder.useNewSettings('".$themeURL."',".$ICEcoder["codeAssist"].",".$ICEcoder["lockedNav"].",'".$ICEcoder["tagWrapperCommand"]."','".$ICEcoder["autoComplete"]."',".$ICEcoder["visibleTabs"].",'".$ICEcoder["fontSize"]."',".$ICEcoder["lineWrapping"].",".$ICEcoder["lineNumbers"].",".$ICEcoder["showTrailingSpace"].",".$ICEcoder["matchBrackets"].",".$ICEcoder["autoCloseTags"].",".$ICEcoder["autoCloseBrackets"].",".$ICEcoder["indentWithTabs"].",".$ICEcoder["indentAuto"].",".$ICEcoder["indentSize"].",'".$ICEcoder["pluginPanelAligned"]."',".$jsBugFilePaths.",".$ICEcoder["bugFileCheckTimer"].",".$ICEcoder["bugFileMaxLines"].",'".$githubAuthTokenSet."',".$ICEcoder["updateDiffOnSave"].",".$ICEcoder["autoLogoutMins"].",".$refreshFM.");iceRoot = '".$ICEcoder["root"]."';</script>";
|
||||
echo "<script>parent.parent.ICEcoder.settingsScreen('hide');parent.parent.ICEcoder.useNewSettings('".$themeURL."',".$ICEcoder["codeAssist"].",".$ICEcoder["lockedNav"].",'".$ICEcoder["tagWrapperCommand"]."','".$ICEcoder["autoComplete"]."',".$ICEcoder["visibleTabs"].",'".$ICEcoder["fontSize"]."',".$ICEcoder["lineWrapping"].",".$ICEcoder["lineNumbers"].",".$ICEcoder["showTrailingSpace"].",".$ICEcoder["matchBrackets"].",".$ICEcoder["autoCloseTags"].",".$ICEcoder["autoCloseBrackets"].",".$ICEcoder["indentWithTabs"].",".$ICEcoder["indentAuto"].",".$ICEcoder["indentSize"].",'".$ICEcoder["pluginPanelAligned"]."','".$ICEcoder["scrollbarStyle"]."',".$jsBugFilePaths.",".$ICEcoder["bugFileCheckTimer"].",".$ICEcoder["bugFileMaxLines"].",".$ICEcoder["updateDiffOnSave"].",".$ICEcoder["autoLogoutMins"].",".$refreshFM.");iceRoot = '".$ICEcoder["root"]."';</script>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user