summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/BootisoController.php
diff options
context:
space:
mode:
authormichael pereira2011-04-05 19:33:19 +0200
committermichael pereira2011-04-05 19:33:19 +0200
commit3a6c9972b59b11dc98b76ee51446d5568ef0f519 (patch)
treeb0b93ab6630b09c12a94e7e97fb5bd7783754fca /application/modules/user/controllers/BootisoController.php
parentDates angepasst (diff)
downloadpbs2-3a6c9972b59b11dc98b76ee51446d5568ef0f519.tar.gz
pbs2-3a6c9972b59b11dc98b76ee51446d5568ef0f519.tar.xz
pbs2-3a6c9972b59b11dc98b76ee51446d5568ef0f519.zip
Forms Rechte angepasst, Views angepasst
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");