From 2b44096c4e7019c500d328a322c2f539cfb15e5a Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Fri, 14 Nov 2014 09:49:39 +0000 Subject: [PATCH] Setting for updateDiffOnSave With this enabled (the default), saving a file will copy the main pane value to the diff pane. This means you can see what changes you are making prior to a save and also can undo changes in diff pane to see save points and how they differ to the main pane. --- lib/config___users-template.php | 1 + lib/settings-screen.php | 1 + lib/settings-update.php | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/config___users-template.php b/lib/config___users-template.php index 6a2728b..fb04a98 100644 --- a/lib/config___users-template.php +++ b/lib/config___users-template.php @@ -7,6 +7,7 @@ $ICEcoderUserSettings = array( "root" => "", "checkUpdates" => true, "openLastFiles" => true, +"updateDiffOnSave" => true, "findFilesExclude" => array(".doc",".gif",".jpg",".jpeg",".pdf",".png",".swf",".xml",".zip"), "codeAssist" => true, "visibleTabs" => false, diff --git a/lib/settings-screen.php b/lib/settings-screen.php index 234f532..719be7c 100644 --- a/lib/settings-screen.php +++ b/lib/settings-screen.php @@ -82,6 +82,7 @@ for ($i=0;$i >
>
+> Update diff pane on save

:
">
diff --git a/lib/settings-update.php b/lib/settings-update.php index 4624038..ca70d9d 100644 --- a/lib/settings-update.php +++ b/lib/settings-update.php @@ -14,6 +14,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset $ICEcoder["root"] = xssClean($_POST['root'],"html"); $ICEcoder["checkUpdates"] = isset($_POST['checkUpdates']) && $_POST['checkUpdates'] ? "true" : "false"; $ICEcoder["openLastFiles"] = isset($_POST['openLastFiles']) && $_POST['openLastFiles'] ? "true" : "false"; + $ICEcoder["updateDiffOnSave"] = isset($_POST['updateDiffOnSave']) && $_POST['updateDiffOnSave'] ? "true" : "false"; $ICEcoder["findFilesExclude"] = 'array("'.str_replace(',','","',str_replace(" ","",strClean($_POST['findFilesExclude']))).'")'; $ICEcoder["codeAssist"] = isset($_POST['codeAssist']) && $_POST['codeAssist'] ? "true" : "false"; $ICEcoder["visibleTabs"] = isset($_POST['visibleTabs']) && $_POST['visibleTabs'] ? "true" : "false"; @@ -35,7 +36,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset $ICEcoder["bugFileMaxLines"] = intval($_POST['bugFileMaxLines']); $ICEcoder["githubAuthToken"] = strClean($_POST['githubAuthToken']); - $settingsArray = array("root","checkUpdates","openLastFiles","findFilesExclude","codeAssist","visibleTabs","lockedNav","tagWrapperCommand","autoComplete","password","bannedFiles","bannedPaths","allowedIPs","theme","fontSize","lineWrapping","indentWithTabs","indentSize","pluginPanelAligned","bugFilePaths","bugFileCheckTimer","bugFileMaxLines","githubAuthToken"); + $settingsArray = array("root","checkUpdates","openLastFiles","updateDiffOnSave","findFilesExclude","codeAssist","visibleTabs","lockedNav","tagWrapperCommand","autoComplete","password","bannedFiles","bannedPaths","allowedIPs","theme","fontSize","lineWrapping","indentWithTabs","indentSize","pluginPanelAligned","bugFilePaths","bugFileCheckTimer","bugFileMaxLines","githubAuthToken"); $settingsNew = ""; for ($i=0;$i '; @@ -86,6 +87,6 @@ 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(" ","",strClean($_POST['bugFilePaths'])))."']"; - echo ""; + echo ""; } ?> \ No newline at end of file