diff options
Diffstat (limited to 'application/modules/user/controllers/BootisoController.php')
-rw-r--r-- | application/modules/user/controllers/BootisoController.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/application/modules/user/controllers/BootisoController.php b/application/modules/user/controllers/BootisoController.php index cec9e8a..344de0e 100644 --- a/application/modules/user/controllers/BootisoController.php +++ b/application/modules/user/controllers/BootisoController.php @@ -85,14 +85,20 @@ class user_BootisoController extends Zend_Controller_Action { } } + $this->view->download = array(); $this->view->bootisolist = array_reverse($this->view->bootisolist); $preboottypeMapper = new Application_Model_PreBootTypeMapper(); + $prebootMapper = new Application_Model_PreBootMapper(); + foreach ($this->view->bootisolist as $bootiso) { $bootiso->setGroupID("[".$bootiso->getGroupID()."] ".$groupMapper->find($bootiso->getGroupID())->getTitle()); $bootiso->setPreBootTypeID($preboottypeMapper->find($bootiso->getPreBootTypeID())->getName()); $bootiso->setCreated(date(Zend_Registry::get('dateformat'), $bootiso->getCreated())); + if($prebootMapper->findBy(array("serialnumber" => $bootiso->getSerialnumber())) != null){ + $this->view->download[$bootiso->getID()] = true; + } if($bootiso->getExpires() == "") { $bootiso->setExpires(0); } |