From 848128d2227c490c5c2fbcb298dbf4e589052115 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Thu, 10 Jan 2013 07:13:21 +0000 Subject: show browser dialog when downloading the database in xml - lammi87 issue --- h-source/Application/Controllers/DownloadController.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'h-source') 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); -- cgit v1.2.3