summaryrefslogtreecommitdiffstats
path: root/application/modules/dev/controllers/BootisoController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/dev/controllers/BootisoController.php')
-rw-r--r--application/modules/dev/controllers/BootisoController.php27
1 files changed, 12 insertions, 15 deletions
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 ./");
+