summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Neves2012-01-26 19:36:17 +0100
committerMichael Neves2012-01-26 19:36:17 +0100
commit5b34279b4fc78e0cbb2becabd8343f7be0ada545 (patch)
tree92a8045d04c327e72708210510942189f9853ec8
parentBootiso fix (diff)
downloadpbs2-5b34279b4fc78e0cbb2becabd8343f7be0ada545.tar.gz
pbs2-5b34279b4fc78e0cbb2becabd8343f7be0ada545.tar.xz
pbs2-5b34279b4fc78e0cbb2becabd8343f7be0ada545.zip
Bootiso download
-rw-r--r--application/modules/user/controllers/BootisoController.php6
-rw-r--r--application/modules/user/views/scripts/bootiso/index.phtml2
2 files changed, 7 insertions, 1 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);
}
diff --git a/application/modules/user/views/scripts/bootiso/index.phtml b/application/modules/user/views/scripts/bootiso/index.phtml
index 2e71b18..c46c088 100644
--- a/application/modules/user/views/scripts/bootiso/index.phtml
+++ b/application/modules/user/views/scripts/bootiso/index.phtml
@@ -38,7 +38,7 @@
</div>
<div class='content'>
<div class='actions'>
- <?php if(Pbs_Acl::checkRight('bdld')): ?>
+ <?php if(Pbs_Acl::checkRight('bdld') && $this->download[$bootiso->getID()] ): ?>
<a href="<?php echo $this->url(
array(
'module' => 'user',