changeset 2810:939d5fdfdc32

Merge branch 'master' into vnext
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Tue, 25 Apr 2017 12:11:33 +0100
parents 74b0a1be28a7 (current diff) 19ec114ea8c6 (diff)
children d618889715d7
files
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/php/requestKey.php	Tue Apr 25 09:52:30 2017 +0100
+++ b/php/requestKey.php	Tue Apr 25 12:11:33 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 09:52:30 2017 +0100
+++ b/php/save.php	Tue Apr 25 12:11:33 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>');