From f0c5d141c3235da21e56f9f52095e248e2801506 Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 22 Nov 2011 19:08:49 +0100 Subject: fbgui menu fix --- .../modules/fbgui/controllers/IndexController.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'application/modules/fbgui/controllers/IndexController.php') diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php index ccc15d6..06c94aa 100644 --- a/application/modules/fbgui/controllers/IndexController.php +++ b/application/modules/fbgui/controllers/IndexController.php @@ -36,7 +36,7 @@ class Fbgui_IndexController extends Zend_Controller_Action public function indexAction() { $mySession = new Zend_Session_Namespace('pbs'); - + $this->view->notification = array(); if(count($mySession->postdata)<=0){ @@ -46,7 +46,7 @@ class Fbgui_IndexController extends Zend_Controller_Action $result = $this->_request->getParam('notify'); if($result == 'nomember'){ $pbsNotifier = new Pbs_Notifier(); - $this->view->notification = $pbsNotifier->notify('You have no membership, therefore you have no own BootMenu','info'); + $this->view->notification[] = $pbsNotifier->notify('You have no membership, therefore you have no own BootMenu','info'); } $d = new Pbs_Debug(); @@ -134,9 +134,17 @@ class Fbgui_IndexController extends Zend_Controller_Action if($bm->MembershipID != '' && $bm->MembershipID == $this->membership->getID()){} else{ $pbsNotifier = new Pbs_Notifier(); - $this->view->notification = $pbsNotifier->notify("This is not your Bootmenu. There is currently a BootMenu with a higher priority active.",'info'); + $this->view->notification[] = $pbsNotifier->notify("This is not your Bootmenu. There is currently a BootMenu with a higher priority active.",'info'); } } + + if(count($res) == 0){ + $pbsNotifier = new Pbs_Notifier(); + $this->view->notification[] = $pbsNotifier->notify("There are no entries in the bootmenu.",'info'); + $this->view->nobootmenu = true; + } + + } else{ // print_a('Debug Output', @@ -148,11 +156,11 @@ class Fbgui_IndexController extends Zend_Controller_Action if (!Zend_Auth::getInstance()->hasIdentity()) { $this->view->loginmenu = true; $pbsNotifier = new Pbs_Notifier(); - $this->view->notification = $pbsNotifier->notify("There is no default BootMenu, please Login to get your BootMenu.",'info'); + $this->view->notification[] = $pbsNotifier->notify("There is no default BootMenu, please Login to get your BootMenu.",'info'); } else{ $pbsNotifier = new Pbs_Notifier(); - $this->view->notification = $pbsNotifier->notify("You have no BootMenu.",'info'); + $this->view->notification[] = $pbsNotifier->notify("You have no BootMenu.",'info'); } $this->view->nobootmenu = true; } -- cgit v1.2.3-55-g7522