From 61fb3bc89bdec2adb24a661cf91dcde73c2de94b Mon Sep 17 00:00:00 2001 From: michael pereira Date: Tue, 22 Mar 2011 13:19:17 +0100 Subject: Download des BootIsos gefixt --- .../modules/dev/controllers/BootisoController.php | 27 ++++++++++------------ 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'application/modules/dev/controllers/BootisoController.php') diff --git a/application/modules/dev/controllers/BootisoController.php b/application/modules/dev/controllers/BootisoController.php index da3e4c2..d8b4aec 100644 --- a/application/modules/dev/controllers/BootisoController.php +++ b/application/modules/dev/controllers/BootisoController.php @@ -33,28 +33,25 @@ class dev_BootisoController extends Zend_Controller_Action $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); - $prebootID = $this->_request->getParam('prebootID'); - $serialnumber = $this->_request->getParam('serialnumber'); + $prebootID = $this->_request->getParam('prebootID'); + $bootisoID = $this->_request->getParam('bootisoID'); - if(is_dir("../resources/bootmedium/$prebootID/") && is_numeric($prebootID)){ + if(is_dir("../resources/bootmedium/$prebootID/") && is_numeric($prebootID) && is_numeric($bootisoID)){ -// header('Content-Type: application/x-gzip'); -// $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']) == 'IE') ? 'inline' : 'attachment'; -// header('Content-Disposition: ' . $content_disp . '; filename="preboot.tgz"'); -// header('Pragma: no-cache'); -// header('Expires: 0'); + chdir("../resources/bootmedium/$prebootID/"); + + header("X-Sendfile: $bootisoID".".zip"); + header('Content-Type: application/x-gzip'); + $content_disp = ( ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']) == 'IE') ? 'inline' : 'attachment'; + header('Content-Disposition: ' . $content_disp . '; filename="preboot.zip"'); + header('Pragma: no-cache'); + header('Expires: 0'); - chdir("../resources/bootmedium/$prebootID/preboot/"); - $prebootname = array_pop(scandir("./")); - print_a($prebootname); - $fp = fopen($prebootname."/build/rootfs/tmp/proobootisoSerial.txt", "w"); - fputs ($fp, $serialnumber); - fclose ($fp); // create the gzipped tarfile. - passthru("tar -cvz ./"); + -- cgit v1.2.3-55-g7522