summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authormichael pereira2011-03-22 13:19:17 +0100
committermichael pereira2011-03-22 13:19:17 +0100
commit61fb3bc89bdec2adb24a661cf91dcde73c2de94b (patch)
tree44887652c45125b28b1ba030a3bae363fe233544 /application
parentfbgui index merge (diff)
downloadpbs2-61fb3bc89bdec2adb24a661cf91dcde73c2de94b.tar.gz
pbs2-61fb3bc89bdec2adb24a661cf91dcde73c2de94b.tar.xz
pbs2-61fb3bc89bdec2adb24a661cf91dcde73c2de94b.zip
Download des BootIsos gefixt
Diffstat (limited to 'application')
-rw-r--r--application/models/BootOsMapper.php1
-rw-r--r--application/modules/dev/controllers/BootisoController.php27
-rw-r--r--application/modules/dev/controllers/ResourceController.php1
-rw-r--r--application/modules/dev/views/scripts/bootiso/index.phtml2
-rw-r--r--application/modules/dev/views/scripts/bootmenu/index.phtml4
5 files changed, 16 insertions, 19 deletions
diff --git a/application/models/BootOsMapper.php b/application/models/BootOsMapper.php
index 1856384..c4963cd 100644
--- a/application/models/BootOsMapper.php
+++ b/application/models/BootOsMapper.php
@@ -68,7 +68,6 @@ class Application_Model_BootOsMapper
public function find($id, Application_Model_BootOs $botos = null)
{
- $botos = new Application_Model_BootOs();
$result = $this->getDbTable()->find($id);
if (0 == count($result)) {
return;
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 ./");
+
diff --git a/application/modules/dev/controllers/ResourceController.php b/application/modules/dev/controllers/ResourceController.php
index cbca8d0..f37e0bc 100644
--- a/application/modules/dev/controllers/ResourceController.php
+++ b/application/modules/dev/controllers/ResourceController.php
@@ -112,6 +112,7 @@ class dev_ResourceController extends Zend_Controller_Action
else
$result = $bme->getKclappend();
+ $result .= " session=".$_SESSION['alphasessionID'];
echo $result;
diff --git a/application/modules/dev/views/scripts/bootiso/index.phtml b/application/modules/dev/views/scripts/bootiso/index.phtml
index d3e954b..ada36d6 100644
--- a/application/modules/dev/views/scripts/bootiso/index.phtml
+++ b/application/modules/dev/views/scripts/bootiso/index.phtml
@@ -34,7 +34,7 @@
'controller' => 'bootiso',
'action' => 'downloadbootiso',
'prebootID' => $bootiso->getprebootID(),
- 'serialnumber' => $bootiso->getSerialnumber()
+ 'bootisoID' => $bootiso->getID()
),
'default',
true, false) ?>"><img src='/media/img/download.png' alt='Download BootMedium' /></a></td>
diff --git a/application/modules/dev/views/scripts/bootmenu/index.phtml b/application/modules/dev/views/scripts/bootmenu/index.phtml
index 5a56fc4..3eb3b0c 100644
--- a/application/modules/dev/views/scripts/bootmenu/index.phtml
+++ b/application/modules/dev/views/scripts/bootmenu/index.phtml
@@ -91,10 +91,10 @@
<td><?php echo $this->escape($bootmenuentry->getID()); ?></td>
<td><?php echo $this->escape($bootmenuentry->getTitle()); ?></td>
<!--<td><?php echo $this->escape($bootmenuentry->getBootmenuID()); ?></td>
- --><td><?php echo "[".$this->escape($bootmenuentry->getBootosID()."] ". $bootos->getTitle()); ?></td>
+ --><td><?php echo "[".$this->escape($bootmenuentry->getBootosID())."] ". $bootos->getTitle(); ?></td>
<td><?php echo $this->escape($bootmenuentry->getKcl()); ?></td>
<td><?php echo $this->escape($bootmenuentry->getKclappend()); ?></td>
- <td><?php echo "[".$this->escape($bootmenuentry->getConfigID()."] ". $config->getTitle()); ?></td>
+ <td><?php echo "[".$this->escape($bootmenuentry->getConfigID())."] ". $config->getTitle(); ?></td>
<td><?php echo $this->escape($bootmenuentry->getOrder() + 1); ?></td>
<td class='action'><a href="<?php echo $this->url(
array(