Assign a meaningful name (and mime type) to the files produced by the (non-interactive) web export.

SVN:trunk[3722]
This commit is contained in:
Denis Flaven
2015-09-07 10:38:03 +00:00
parent 40990020b1
commit 5cbcebb79e

View File

@@ -487,7 +487,7 @@ function CheckParameters($sExpression, $sQueryId, $sFormat)
return $oExporter;
}
function DoExport(Page $oP, BulkExport $oExporter, $bInteractive = false)
function DoExport(WebPage $oP, BulkExport $oExporter, $bInteractive = false)
{
$oExporter->SetHttpHeaders($oP);
$exportResult = $oExporter->GetHeader();
@@ -507,6 +507,7 @@ function DoExport(Page $oP, BulkExport $oExporter, $bInteractive = false)
{
$exportResult .= $oExporter->GetFooter();
$oP->SetContentType($oExporter->GetMimeType());
$oP->SetContentDisposition('attachment', $oExporter->GetDownloadFileName());
$oP->add($exportResult);
$oExporter->Cleanup();
}