summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichael pereira2011-03-21 11:50:11 +0100
committermichael pereira2011-03-21 11:50:11 +0100
commit3e7cd9b0a0626d9e9f1814d9eac0becd3f6dc97d (patch)
tree1391ea9b0c9ca0db982708e3c21668a03786240c
parentpbs-newdata (diff)
downloadpbs2-3e7cd9b0a0626d9e9f1814d9eac0becd3f6dc97d.tar.gz
pbs2-3e7cd9b0a0626d9e9f1814d9eac0becd3f6dc97d.tar.xz
pbs2-3e7cd9b0a0626d9e9f1814d9eac0becd3f6dc97d.zip
Preboot download working
-rw-r--r--application/modules/dev/controllers/BootisoController.php15
1 files changed, 7 insertions, 8 deletions
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');
- //}
+ }