changeset 2811:d618889715d7

Merge branch 'vnext' into Dev_main
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Tue, 25 Apr 2017 12:11:42 +0100
parents 3a2dbff86da9 (current diff) 939d5fdfdc32 (diff)
children 2c4a060965a4 6669951d4856
files
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/php/requestKey.php	Tue Apr 25 11:08:12 2017 +0100
+++ b/php/requestKey.php	Tue Apr 25 12:11:42 2017 +0100
@@ -58,7 +58,8 @@
 $doc_struct = new DOMDocument;
 $doc_struct->preserveWhiteSpace = false;
 $doc_struct->formatOutput = true;
-$doc_struct->loadXML("<waetresult/>");
+$doc_struct->loadXML("<waetresult />");
+$doc_struct->documentElement->setAttribute("key", $key);
 // Add the root
 if (file_exists($testURL)) {
     $test_proto_doc = new DOMDocument;
--- a/php/save.php	Tue Apr 25 11:08:12 2017 +0100
+++ b/php/save.php	Tue Apr 25 12:11:42 2017 +0100
@@ -28,10 +28,12 @@
 $saveFilenamePrefix = '';
 if (isset($_GET['saveFilenamePrefix'])) {
     $saveFilenamePrefix = $_GET['saveFilenamePrefix'].'-';
+} else {
+    $saveFilenamePrefix = "save-";
 }
 $postText = file_get_contents('php://input');
 $file_key = $_GET['key'];
-$filename = '../saves/'.$saveFilenamePrefix.'save-'.$file_key.".xml";
+$filename = '../saves/'.$saveFilenamePrefix.$file_key.".xml";
 
 if (!file_exists($filename)) {
     die('<response state="error"><message>Could not find save</message></response>');