diff --git a/classes/File.php b/classes/File.php index 6db891f..d058015 100644 --- a/classes/File.php +++ b/classes/File.php @@ -301,7 +301,7 @@ class File /* Saving under conditions: Confirmation of overwrite or there is no filename conflict, it is a new file, in either case we can save */ if (overwriteOK || noConflictSave) { - newFileName = "' . (isset($ftpSite) ? "" : $docRoot) . '" + newFileName; + newFileName = "' . (true === $ftpSite ? "" : $docRoot) . '" + newFileName; saveURL = "lib/file-control.php?action=save' . $fileMDTURLPart . $fileVersionURLPart . '&csrf=' . $_GET["csrf"] . '"; var xhr = ICEcoder.xhrObj(); @@ -330,7 +330,7 @@ class File ICEcoder.serverMessage("' . $t['Saving'] . '
" + "'.("Save" === $finalAction ? "newFileName" : "'" . $fileName . "'") . '"); } } - },10); + }, 10); }; /* UI dialog cancelling and saving contents for save as looparound */ diff --git a/lib/file-control.php b/lib/file-control.php index b27a829..4f60fbf 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -107,7 +107,7 @@ if (!$error && "save" === $_GET['action']) { "fileName" => $fileName, "fileMDTURLPart" => $fileMDTURLPart, "fileVersionURLPart" => $fileVersionURLPart, - "ftpSite" => $ftpSite + "ftpSite" => true === isset($ftpSite) ]; $doNext .= $fileClass->handleSaveLooparound($fileDetails, $finalAction, $doNext, $t);