diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2013-01-10 07:13:21 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2013-01-10 07:13:21 +0000 |
commit | 848128d2227c490c5c2fbcb298dbf4e589052115 (patch) | |
tree | 60a3ae70a819d0b374c849bda4d842bb462930ef /h-source | |
parent | 90fff0e83ac78f93d2ab0cd507626a04e3b8fd95 (diff) |
show browser dialog when downloading the database in xml - lammi87 issue
Diffstat (limited to 'h-source')
-rw-r--r-- | h-source/Application/Controllers/DownloadController.php | 7 |
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); |