diff options
-rw-r--r-- | application/controllers/ResourceController.php | 3 |
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))); |