summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/BootisoController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/controllers/BootisoController.php')
-rw-r--r--application/modules/user/controllers/BootisoController.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/application/modules/user/controllers/BootisoController.php b/application/modules/user/controllers/BootisoController.php
index 2c9c584..5f1a3a2 100644
--- a/application/modules/user/controllers/BootisoController.php
+++ b/application/modules/user/controllers/BootisoController.php
@@ -105,7 +105,7 @@ class user_BootisoController extends Zend_Controller_Action
$this->view->prebootlist = array();
foreach ($this->view->bootisolist as $bootiso){
- $this->view->prebootlist[$bootiso->getID()] = $prebootMapper->find($bootiso->getPrebootID())->getTitle();
+ $bootiso->setPrebootID("[".$bootiso->getPrebootID()."] ".$prebootMapper->find($bootiso->getPrebootID())->getTitle());
$bootiso->setGroupID("[".$bootiso->getGroupID()."] ".$groupMapper->find($bootiso->getGroupID())->getTitle());
$bootiso->setCreated(date(Zend_Registry::get('dateformat'),$bootiso->getCreated()));
$bootiso->setExpires(date(Zend_Registry::get('dateformat'),$bootiso->getExpires()));
@@ -128,15 +128,17 @@ class user_BootisoController extends Zend_Controller_Action
if(!Pbs_Acl::checkRight('bdld'))
$this->_redirect('/user/bootiso/index/page/'.$this->page.'/downloadresult/forbidden');
- $prebootID = $this->_request->getParam('prebootID');
$bootisoID = $this->_request->getParam('bootisoID');
+
+ if(!is_numeric($bootisoID))
+ $this->_redirect('/user/bootiso/index/page/'.$this->page.'/downloadresult/forbidden');
+ $prebootID = $this->bootisoMapper->find($bootisoID)->getPrebootID();
+
+
if(!is_dir("../resources/bootmedium/$prebootID/"))
$this->_redirect('/user/bootiso/index/page/'.$this->page.'/downloadresult/404');
- if(!is_numeric($prebootID) || !is_numeric($bootisoID))
- $this->_redirect('/user/bootiso/index/page/'.$this->page.'/downloadresult/forbidden');
-
chdir("../resources/bootmedium/$prebootID/");
header("X-Sendfile: $bootisoID".".zip");