diff --git a/lib/backup-versions.php b/lib/backup-versions.php
index 134c6a0..0921d02 100644
--- a/lib/backup-versions.php
+++ b/lib/backup-versions.php
@@ -113,18 +113,18 @@ include(dirname(__FILE__)."/language-modes-partial.js");
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
mode: mode,
- lineNumbers: ICEcoder.lineNumbers,
+ lineNumbers: parent.parent.ICEcoder.lineNumbers,
gutters: ["CodeMirror-foldgutter","CodeMirror-lint-markers","CodeMirror-linenumbers"],
foldGutter: {gutter: "CodeMirror-foldgutter"},
foldOptions: {minFoldSize: 1},
- lineWrapping: ICEcoder.lineWrapping,
- indentWithTabs: ICEcoder.indentWithTabs,
- indentUnit: ICEcoder.indentSize,
- tabSize: ICEcoder.indentSize,
- matchBrackets: ICEcoder.matchBrackets,
+ lineWrapping: parent.parent.ICEcoder.lineWrapping,
+ indentWithTabs: parent.parent.ICEcoder.indentWithTabs,
+ indentUnit: parent.parent.ICEcoder.indentSize,
+ tabSize: parent.parent.ICEcoder.indentSize,
+ matchBrackets: parent.parent.ICEcoder.matchBrackets,
electricChars: false,
highlightSelectionMatches: true,
- showTrailingSpace: ICEcoder.showTrailingSpace,
+ showTrailingSpace: parent.parent.ICEcoder.showTrailingSpace,
lint: false,
readOnly: "nocursor",
theme: ""
@@ -134,31 +134,31 @@ editor.setSize("480px","500px");
var openNew = function() {
var cM;
- ICEcoder.showHide('hide',document.getElementById('blackMask'))
- ICEcoder.newTab();
- cM = ICEcoder.getcMInstance();
+ parent.parent.ICEcoder.showHide('hide',parent.document.getElementById('blackMask'))
+ parent.parent.ICEcoder.newTab();
+ cM = parent.parent.ICEcoder.getcMInstance();
cM.setValue(editor.getValue());
}
var openDiff = function() {
var cMDiff;
- ICEcoder.showHide('hide',document.getElementById('blackMask'))
- ICEcoder.setSplitPane('on');
- cMDiff = ICEcoder.getcMdiffInstance();
- ICEcoder.focus('diff');
+ parent.parent.ICEcoder.showHide('hide',parent.document.getElementById('blackMask'))
+ parent.parent.ICEcoder.setSplitPane('on');
+ cMDiff = parent.parent.ICEcoder.getcMdiffInstance();
+ parent.parent.ICEcoder.focus('diff');
cMDiff.setValue(editor.getValue());
}
var restoreVersion = function() {
var cM;
- 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();
+ if (parent.parent.ICEcoder.ask("To confirm - this will paste the displayed backup content to your current tab and save, OK?")) {
+ parent.parent.ICEcoder.showHide('hide',parent.document.getElementById('blackMask'))
+ cM = parent.parent.ICEcoder.getcMInstance();
+ parent.parent.ICEcoder.focus();
cM.setValue(editor.getValue());
- ICEcoder.saveFile();
+ parent.parent.ICEcoder.saveFile();
}
}
diff --git a/lib/ftp-manager.php b/lib/ftp-manager.php
index c9c9be0..e5c520d 100644
--- a/lib/ftp-manager.php
+++ b/lib/ftp-manager.php
@@ -18,7 +18,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
// Set the site ref in session, hide the popup and reload the file manager
$_SESSION['ftpSiteRef'] = numClean($_GET['ftpSiteRef']);
// Hide this popup and reload file manager
- echo "";
+ echo "";
} else {
// Start creating a new chunk for the FTP sites
$settingsNew = '"ftpSites" => array(
@@ -109,10 +109,10 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
fclose($fh);
// Finally, reload the iFrame screen for the user
header("Location: ftp-manager.php?updatedFTPSites&csrf=".$_SESSION["csrf"]);
- echo "";
+ echo "";
die($t['Saving FTP sites']);
} else {
- echo "";
+ echo "";
}
}
}
@@ -147,7 +147,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
echo '
'.$ftpSites[$i]['site'].' | ';
echo ''.$ftpSites[$i]['host'].' | ';
echo 'Edit | ';
- echo 'Delete | ';
+ echo 'Delete | ';
echo ''.$t['Choose'].' | ';
echo '';
}
diff --git a/lib/get-branch.php b/lib/get-branch.php
index d44b9f0..5560f00 100644
--- a/lib/get-branch.php
+++ b/lib/get-branch.php
@@ -127,7 +127,7 @@ if (isset($ftpSite)) {
ftpStart();
// Show user warning if no good connection
if (!$ftpConn || !$ftpLogin) {
- die('');
+ die('');
exit;
}
// Get our simple and detailed lists and close the FTP connection
@@ -186,15 +186,15 @@ for ($i=0;$i ".xssClean(basename($fileFolderName),"html")." ";
+ " if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {parent.parent.ICEcoder.openFile()}}\" style=\"position: relative; left:-22px\"> ".xssClean(basename($fileFolderName),"html")." ";
if (!isset($ftpSite)) {
$thisPermVal = $serverType=="Linux" ? substr(sprintf('%o', fileperms($docRoot.$iceRoot.$fileFolderName)), -3) : '';
} else {
@@ -224,7 +224,7 @@ echo ' ';
if (!isset($ftpSite) && $_SESSION['githubDiff']) {
// Show the loading screen until we're done comparing files with GitHub
- echo "";
+ echo "";
$i=0;
$dirListArray = $dirSHAArray = $dirTypeArray = array();
// For each of the files in our local path...
@@ -356,20 +356,20 @@ if (!isset($ftpSite) && $_SESSION['githubDiff']) {
// If there are no diffs, ask user if they want to switch back to regular mode
setTimeout(function(){
if (parent.document.getElementById('|').parentNode.parentNode.parentNode.childNodes[2].childNodes.length==1) {
- if(parent.ICEcoder.ask('')) {
- parent.ICEcoder.githubDiffToggle();
+ if(parent.parent.ICEcoder.ask('')) {
+ parent.parent.ICEcoder.githubDiffToggle();
} else {
- parent.ICEcoder.showHide('hide',parent.get('loadingMask'));
+ parent.parent.ICEcoder.showHide('hide',parent.get('loadingMask'));
}
} else {
- parent.ICEcoder.showHide('hide',parent.get('loadingMask'));
+ parent.parent.ICEcoder.showHide('hide',parent.get('loadingMask'));
}
},100);
},4);
} else {
// There was an error, display HTTP error code and response message
- parent.ICEcoder.message(' '+err.error+'\n\n'+err.request.response);
- parent.ICEcoder.showHide('hide',parent.get('loadingMask'));
+ parent.parent.ICEcoder.message(' '+err.error+'\n\n'+err.request.response);
+ parent.parent.ICEcoder.showHide('hide',parent.get('loadingMask'));
}
});
@@ -432,15 +432,15 @@ if (!isset($ftpSite) && $_SESSION['githubDiff']) {
// If we're adding a deleted dir/file in a sub-dir
if ("" == "/"+thePath) {
- parent.ICEcoder.updateFileManagerList('add','/'+thePath,theFile,false,false,false,'file');
+ parent.parent.ICEcoder.updateFileManagerList('add','/'+thePath,theFile,false,false,false,'file');
// If we're adding a deleted dir/file at the root level
} else {
// Folder
if (thePath != "") {
- parent.ICEcoder.updateFileManagerList('add',parent.iceRoot,thePath,false,false,false,'folder');
+ parent.parent.ICEcoder.updateFileManagerList('add',parent.iceRoot,thePath,false,false,false,'folder');
// File
} else {
- parent.ICEcoder.updateFileManagerList('add',parent.iceRoot+thePath,theFile,false,false,false,'file');
+ parent.parent.ICEcoder.updateFileManagerList('add',parent.iceRoot+thePath,theFile,false,false,false,'file');
}
}
@@ -452,8 +452,8 @@ if (!isset($ftpSite) && $_SESSION['githubDiff']) {
},20);
}
- setTimeout(function(){parent.ICEcoder.redoTabHighlight(parent.ICEcoder.selectedTab);},4);
- if (!parent.ICEcoder.fmReady) {parent.ICEcoder.fmReady=true;};
+ setTimeout(function(){parent.parent.ICEcoder.redoTabHighlight(parent.parent.ICEcoder.selectedTab);},4);
+ if (!parent.parent.ICEcoder.fmReady) {parent.parent.ICEcoder.fmReady=true;};
}
newUL.innerHTML = showContent;
locNest.parentNode.insertBefore(newUL,locNest.nextSibling);
@@ -469,10 +469,10 @@ if (!isset($ftpSite) && $_SESSION['githubDiff']) {
$pathPos = array_search($iceRoot,$iceGithubLocalPaths);
if ($pathPos !== false) {
?>
- if (parent.ICEcoder.ask(" ?")) {
+ if (parent.parent.ICEcoder.ask(" ?")) {
setTimeout(function() {
- parent.ICEcoder.showHide('show',parent.get('loadingMask'));
- parent.ICEcoder.filesFrame.contentWindow.frames['fileControl'].location.href = "github.php?action=clone&csrf="+parent.ICEcoder.csrf;
+ parent.parent.ICEcoder.showHide('show',parent.get('loadingMask'));
+ parent.parent.ICEcoder.filesFrame.contentWindow.frames['fileControl'].location.href = "github.php?action=clone&csrf="+parent.parent.ICEcoder.csrf;
},4);
}
diff --git a/lib/go-localhost-root.php b/lib/go-localhost-root.php
index 242976a..5fc05ec 100644
--- a/lib/go-localhost-root.php
+++ b/lib/go-localhost-root.php
@@ -27,9 +27,9 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn']) {
$_SESSION['ftpSiteRef'] = false;
// Now we've reset the root path to localhost root, refresh the file manager to show it
- echo "";
+ echo "";
} else {
- echo "";
+ echo "";
}
?>
document.getElementById('pluginsOptional').innerHTML = '".str_replace("'","\\'",$pluginsDisplay)."';";
+ echo "";
}
// Work out what plugins we'll need to set on a setInterval
@@ -30,10 +30,10 @@ if ($_SESSION['loggedIn']) {
if (isset($_GET['updatedPlugins'])) {
?>
if (confirm('".$t['ICEcoder needs to...']."')) {window.location.reload(true);} else {window.location='plugins-manager.php?updatedPlugins&csrf='+ICEcoder.csrf;}";
+ echo "";
} else {
header("Location: plugins-manager.php?updatedPlugins&csrf=".$_SESSION["csrf"]);
echo "";
}
die("".$t['saving plugins']."");
} else {
- echo "";
+ echo "";
}
}
diff --git a/lib/properties.php b/lib/properties.php
index 729aaf9..a252ee4 100644
--- a/lib/properties.php
+++ b/lib/properties.php
@@ -166,7 +166,7 @@ var validatePerms = function() {
permText.split("")[2]*1 <0 || permText.split("")[2]*1 >7) {
canUpdate = false;
}
- if (canUpdate) {ICEcoder.chmod('',permText)};
+ if (canUpdate) {parent.parent.ICEcoder.chmod('',permText)};
}
diff --git a/lib/settings-common.php b/lib/settings-common.php
index 88bed0e..845c952 100644
--- a/lib/settings-common.php
+++ b/lib/settings-common.php
@@ -252,7 +252,7 @@ function toUTF8noBOM($string,$message=false) {
if (!$strictUTF8 && strlen($teststringConverted) == strlen($teststringBroken)) {
$string = utf8_encode($string);
if ($message) {
- echo "ICEcoder.message('".$t['Your document does...'].".');";
+ echo "parent.parent.ICEcoder.message('".$t['Your document does...'].".');";
}
}
}
diff --git a/lib/settings-screen.php b/lib/settings-screen.php
index 8091693..e85378c 100644
--- a/lib/settings-screen.php
+++ b/lib/settings-screen.php
@@ -356,10 +356,10 @@ function findSequence(goal) {
-">update
+">update
">
diff --git a/lib/settings-update.php b/lib/settings-update.php
index 71bd3be..132b565 100644
--- a/lib/settings-update.php
+++ b/lib/settings-update.php
@@ -79,7 +79,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
fwrite($fh, $settingsContents);
fclose($fh);
} else {
- echo "";
+ echo "";
}
// OK, now the config file has been updated, update our current session with new arrays
@@ -110,7 +110,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
fwrite($fConfigSettings, $generalSettingsContents);
fclose($fConfigSettings);
} else {
- echo "";
+ echo "";
}
$githubAuthTokenSet = $ICEcoder["githubAuthToken"] != "" ? "true" : "false";
@@ -123,5 +123,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 "";
+ echo "";
}