aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application')
-rw-r--r--h-source/Application/Controllers/DownloadController.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/h-source/Application/Controllers/DownloadController.php b/h-source/Application/Controllers/DownloadController.php
index c8e79c9..d302ab5 100644
--- a/h-source/Application/Controllers/DownloadController.php
+++ b/h-source/Application/Controllers/DownloadController.php
@@ -171,6 +171,13 @@ class DownloadController extends BaseController
{
header ("Content-Type:text/xml");
+// header("Content-Type: application/force-download");
+// header("Content-Type: application/octet-stream");
+// header("Content-Type: application/download");
+
+ $filename = array_key_exists('type',$whereArray) ? $whereArray['type'] : "all";
+ header("Content-Disposition: attachment; filename=h-node-".$filename.".xml;");
+
$res = $this->m['HardwareModel']->clear()->select()->where($whereArray)->aWhere(array("cleared"=>"no"))->orderBy("type,hardware.id_hard")->send();
$data['xml'] = $this->getXml($res);