# HG changeset patch # User www-data # Date 1493119254 -3600 # Node ID ac4eb45fa4c65fea5d7404d403d22a6d3e383192 # Parent 3bf85a38976f7d21559a1b2e5484eeecd397a18a# Parent 19ec114ea8c62754b0c1e1a01e38559239f8152b Merge branch 'master' of https://github.com/BrechtDeMan/WebAudioEvaluationTool diff -r 3bf85a38976f -r ac4eb45fa4c6 php/requestKey.php --- a/php/requestKey.php Tue Apr 25 10:25:25 2017 +0100 +++ b/php/requestKey.php Tue Apr 25 12:20:54 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 3bf85a38976f -r ac4eb45fa4c6 php/save.php --- a/php/save.php Tue Apr 25 10:25:25 2017 +0100 +++ b/php/save.php Tue Apr 25 12:20:54 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');