diff options
| author | Michael Neves | 2012-01-26 19:36:17 +0100 |
|---|---|---|
| committer | Michael Neves | 2012-01-26 19:36:17 +0100 |
| commit | 5b34279b4fc78e0cbb2becabd8343f7be0ada545 (patch) | |
| tree | 92a8045d04c327e72708210510942189f9853ec8 /application/modules/user/controllers | |
| parent | Bootiso fix (diff) | |
| download | pbs2-5b34279b4fc78e0cbb2becabd8343f7be0ada545.tar.gz pbs2-5b34279b4fc78e0cbb2becabd8343f7be0ada545.tar.xz pbs2-5b34279b4fc78e0cbb2becabd8343f7be0ada545.zip | |
Bootiso download
Diffstat (limited to 'application/modules/user/controllers')
| -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); } |
