Skip to content

Commit

Permalink
Fix download header and add download hint #30
Browse files Browse the repository at this point in the history
  • Loading branch information
nearwood committed Nov 7, 2019
1 parent 11b4567 commit 3e169d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/browse.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
for ($c = 0; $c < $numResults; $c++)
{
$aspiration = $results[$c]['induction'] == 1 ? "Turbo" : "NA";
echo '<tr><td><a href="view.php?msq=' . $results[$c]['mid'] . '">' . $results[$c]['uploadDate'] . '</a></td><td>' . $results[$c]['make'] . '</td><td>' . $results[$c]['code'] . '</td><td>' . $results[$c]['numCylinders'] . '</td><td>' . $results[$c]['displacement'] . '</td><td>' . $results[$c]['compression'] . ':1</td><td>' . $aspiration . '</td><td>' . $results[$c]['firmware'] . '/' . $results[$c]['signature'] . '</td><td>' . $results[$c]['views'] . '</td><td><a title="Download MSQ" href="download.php?msq=' . $results[$c]['mid'] . '">💾</a></td></tr>';
echo '<tr><td><a href="view.php?msq=' . $results[$c]['mid'] . '">' . $results[$c]['uploadDate'] . '</a></td><td>' . $results[$c]['make'] . '</td><td>' . $results[$c]['code'] . '</td><td>' . $results[$c]['numCylinders'] . '</td><td>' . $results[$c]['displacement'] . '</td><td>' . $results[$c]['compression'] . ':1</td><td>' . $aspiration . '</td><td>' . $results[$c]['firmware'] . '/' . $results[$c]['signature'] . '</td><td>' . $results[$c]['views'] . '</td><td><a title="Download MSQ" download href="download.php?msq=' . $results[$c]['mid'] . '">💾</a></td></tr>';
}
echo '</table></div>';

Expand Down
4 changes: 1 addition & 3 deletions src/download.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@
require "msqur.php";

if (isset($_GET['msq'])) {

header('Content-Type: application/xml');
header('Content-Disposition: attachment; filename=' . $_GET['msq'] . '.msq');
header('Content-Disposition: attachment; filename="' . $_GET['msq'] . '.msq"');
header('Pragma: no-cache');

echo $msqur->getMSQForDownload($_GET['msq']);
} else {

include "index.php";
}
?>

0 comments on commit 3e169d0

Please sign in to comment.