top. removed from backup-versions and download

This commit is contained in:
mattpass
2020-02-28 17:15:30 +00:00
parent 2257343a32
commit 86967a57f8
2 changed files with 20 additions and 20 deletions

View File

@@ -113,18 +113,18 @@ include(dirname(__FILE__)."/language-modes-partial.js");
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
mode: mode,
lineNumbers: top.ICEcoder.lineNumbers,
lineNumbers: ICEcoder.lineNumbers,
gutters: ["CodeMirror-foldgutter","CodeMirror-lint-markers","CodeMirror-linenumbers"],
foldGutter: {gutter: "CodeMirror-foldgutter"},
foldOptions: {minFoldSize: 1},
lineWrapping: top.ICEcoder.lineWrapping,
indentWithTabs: top.ICEcoder.indentWithTabs,
indentUnit: top.ICEcoder.indentSize,
tabSize: top.ICEcoder.indentSize,
matchBrackets: top.ICEcoder.matchBrackets,
lineWrapping: ICEcoder.lineWrapping,
indentWithTabs: ICEcoder.indentWithTabs,
indentUnit: ICEcoder.indentSize,
tabSize: ICEcoder.indentSize,
matchBrackets: ICEcoder.matchBrackets,
electricChars: false,
highlightSelectionMatches: true,
showTrailingSpace: top.ICEcoder.showTrailingSpace,
showTrailingSpace: ICEcoder.showTrailingSpace,
lint: false,
readOnly: "nocursor",
theme: "<?php echo $ICEcoder["theme"]=="default" ? 'icecoder' : $ICEcoder["theme"];?>"
@@ -134,31 +134,31 @@ editor.setSize("480px","500px");
var openNew = function() {
var cM;
top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'))
top.ICEcoder.newTab();
cM = top.ICEcoder.getcMInstance();
ICEcoder.showHide('hide',document.getElementById('blackMask'))
ICEcoder.newTab();
cM = ICEcoder.getcMInstance();
cM.setValue(editor.getValue());
}
var openDiff = function() {
var cMDiff;
top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'))
top.ICEcoder.setSplitPane('on');
cMDiff = top.ICEcoder.getcMdiffInstance();
top.ICEcoder.focus('diff');
ICEcoder.showHide('hide',document.getElementById('blackMask'))
ICEcoder.setSplitPane('on');
cMDiff = ICEcoder.getcMdiffInstance();
ICEcoder.focus('diff');
cMDiff.setValue(editor.getValue());
}
var restoreVersion = function() {
var cM;
if (top.ICEcoder.ask("To confirm - this will paste the displayed backup content to your current tab and save, OK?")) {
top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'))
cM = top.ICEcoder.getcMInstance();
top.ICEcoder.focus();
if (ICEcoder.ask("To confirm - this will paste the displayed backup content to your current tab and save, OK?")) {
ICEcoder.showHide('hide',document.getElementById('blackMask'))
cM = ICEcoder.getcMInstance();
ICEcoder.focus();
cM.setValue(editor.getValue());
top.ICEcoder.saveFile();
ICEcoder.saveFile();
}
}
</script>

View File

@@ -6,7 +6,7 @@ include("settings.php");
$file = realpath($docRoot.$iceRoot.str_replace("|","/",$_GET['file']));
// If it doesn't exist, or doesn't start with the $docRoot, stop here
if (!file_exists($file) || strpos(str_replace("\\","/",$file),$docRoot) !== 0) {
die("<script>top.ICEcoder.message('Sorry, that file doesn\'t appear to exist');</script>");
die("<script>ICEcoder.message('Sorry, that file doesn\'t appear to exist');</script>");
}
if (file_exists($file)) {