Added the ability to download minidimps

This commit is contained in:
Latif Khalifa
2013-10-04 23:42:20 +02:00
parent 1000c4d743
commit dc57f4e5ae
4 changed files with 23 additions and 2 deletions

17
htdocs/download.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
define("SITE_ROOT", realpath(dirname(__file__)));
require_once SITE_ROOT . "/lib/init.php";
$S->requireUser();
$r = ReportParser::parse((int)$_GET["report_id"]);
$miniDump = $r["Minidump"];
if (!$miniDump || !($miniDump->getData()))
{
Layout::header();
print "<h2>Minidump Download</h2><p>No such report</p>";
Layout::footer();
return;
}
http::sendDownload("singularity" . ((int)$_GET["report_id"]) . ".dmp", $miniDump->getData());