Save As added to file control system

saveType var passed through on saving to start a save or save as routine
This commit is contained in:
Matt Pass
2012-02-23 18:11:50 +00:00
parent 29569ac7d1
commit 25a05027b5

View File

@@ -3,6 +3,7 @@
// Establish the full file path reference
$file=$_GET['file'];
if (isset($_GET['saveType'])) {$saveType = $_GET['saveType'];};
$docRoot = str_replace("\\","/",$_SERVER['DOCUMENT_ROOT']);
// Not done the first time we are on the save loop (ie, before the form posting reload)
@@ -167,7 +168,7 @@ if (action=="load") {
<script>
if (action=="save") {
<?php
if ($file=="|[NEW]") {
if ($file=="|[NEW]"||$saveType=="saveAs") {
echo 'newFileName = prompt(\'Enter Filename\',\'/\');';
echo 'document.saveFile.newFileName.value = newFileName;';
}