summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Neves2012-01-26 22:11:09 +0100
committerMichael Neves2012-01-26 22:11:09 +0100
commitc5d57d7c212f9eb90ad16be527aff4d151e73e72 (patch)
tree7d118227935b6750a4dedb6df46ddb04c5e1fd76
parentgetprebootserials download check (diff)
downloadpbs2-c5d57d7c212f9eb90ad16be527aff4d151e73e72.tar.gz
pbs2-c5d57d7c212f9eb90ad16be527aff4d151e73e72.tar.xz
pbs2-c5d57d7c212f9eb90ad16be527aff4d151e73e72.zip
getprebootserials download check
-rw-r--r--application/controllers/ResourceController.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php
index cc9ad46..c097ff6 100644
--- a/application/controllers/ResourceController.php
+++ b/application/controllers/ResourceController.php
@@ -244,7 +244,8 @@ class ResourceController extends Zend_Controller_Action {
$result = "Serials available to Member: ".$person->getFirstname()." ".$person->getName()." in Group: ".$groupMapper->find($member->getGroupID())->getTitle()."\n";
foreach($bootisolist as $k => $bootiso){
$preboot = $prebootMapper->findBy(array('serialnumber' => $bootiso->getSerialnumber(), 'preboottypeID' => $bootiso->getPreboottypeID()));
- $result .= $k.". ".$groupMapper->find($bootiso->getGroupID())->getTitle().", ".$bootiso->getTitle().", ".$preboottypeMapper->find($bootiso->getPreboottypeID())->getName().", ".$bootiso->getSerialnumber().", Download available: ".count($preboot)!=0?"yes":"no"."\n";
+ $download = (count($preboot)!=0)?"yes":"no";
+ $result .= $k.". ".$groupMapper->find($bootiso->getGroupID())->getTitle().", ".$bootiso->getTitle().", ".$preboottypeMapper->find($bootiso->getPreboottypeID())->getName().", ".$bootiso->getSerialnumber().", Download available: ".$download."\n";
}
header("Content-Length: ".(strlen($result)));