# HG changeset patch # User Nicholas Jillings # Date 1493118693 -3600 # Node ID 939d5fdfdc328a0d7cf986a53de665ecc2eede6e # Parent 74b0a1be28a7175b9d000baa69e750e051cc5947# Parent 19ec114ea8c62754b0c1e1a01e38559239f8152b Merge branch 'master' into vnext diff -r 74b0a1be28a7 -r 939d5fdfdc32 php/requestKey.php --- 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(""); +$doc_struct->loadXML(""); +$doc_struct->documentElement->setAttribute("key", $key); // Add the root if (file_exists($testURL)) { $test_proto_doc = new DOMDocument; diff -r 74b0a1be28a7 -r 939d5fdfdc32 php/save.php --- 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('Could not find save');