From 3e7cd9b0a0626d9e9f1814d9eac0becd3f6dc97d Mon Sep 17 00:00:00 2001 From: michael pereira Date: Mon, 21 Mar 2011 11:50:11 +0100 Subject: Preboot download working --- application/modules/dev/controllers/BootisoController.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'application/modules/dev') diff --git a/application/modules/dev/controllers/BootisoController.php b/application/modules/dev/controllers/BootisoController.php index 7390c95..b0f4c2f 100644 --- a/application/modules/dev/controllers/BootisoController.php +++ b/application/modules/dev/controllers/BootisoController.php @@ -33,22 +33,21 @@ class dev_BootisoController extends Zend_Controller_Action $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); - $prebootID = $this->_request->getParams('prebootID'); + $prebootID = $this->_request->getParam('prebootID'); - // if(is_dir("../resources/bootmedium/$prebootID/") && is_numeric($prebootID)){ + if(is_dir("../resources/bootmedium/$prebootID/") && is_numeric($prebootID)){ 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.tar.gz"'); + header('Content-Disposition: ' . $content_disp . '; filename="preboot.zip"'); header('Pragma: no-cache'); header('Expires: 0'); - + // create the gzipped tarfile. - chdir(APPLICATION_PATH . "/resources/bootmedium/$prebootID/"); - passthru( "tar cz ./"); + chdir("../resources/bootmedium/$prebootID/"); + passthru("zip -r - ./"); - $this->_redirect('/dev/bootiso'); - //} + } -- cgit v1.2.3-55-g7522