From 742254fb2f6255223fec85c64f3fbf119072e5dc Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 11 Apr 2011 15:20:05 +0200 Subject: fallbacks in session hinzugefügt --- .../modules/user/controllers/SessionController.php | 28 +++++++++++++++------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'application/modules') diff --git a/application/modules/user/controllers/SessionController.php b/application/modules/user/controllers/SessionController.php index 3768af9..c00d759 100644 --- a/application/modules/user/controllers/SessionController.php +++ b/application/modules/user/controllers/SessionController.php @@ -39,21 +39,31 @@ class User_SessionController extends Zend_Controller_Action $sessions = $sessionMapper->findBy(array('bootisoID',$bootiso->getID())); foreach($sessions as $session){ #echo $session->getBootosID(); - if($session->getBootosID() != '') - $session->setBootosID("[".$session->getBootosID()."] ".$bootosMapper->find($session->getBootosID())->getTitle()); - - if($session->getBootmenuentryID() != '') - $session->setBootmenuentryID("[".$session->getBootmenuentryID()."] ".$bootmenuentriesMapper->find($session->getBootmenuentryID())->getTitle()); + if($session->getBootosID() != ''){ + $bo = $bootosMapper->find($session->getBootosID()); + if($bo != null) + $session->setBootosID("[".$session->getBootosID()."] ".$bo->getTitle()); + } + + if($session->getBootmenuentryID() != ''){ + $bm = $bootmenuentriesMapper->find($session->getBootmenuentryID()); + if($bm != null) + $session->setBootmenuentryID("[".$session->getBootmenuentryID()."] ".$bm->getTitle()); + + } - if($session->getBootisoID() != '') - $session->setBootisoID("[".$session->getBootisoID()."] ".$bootisoMapper->find($session->getBootisoID())->getTitle()); + if($session->getBootisoID() != ''){ + $bi = $bootisoMapper->find($session->getBootisoID()); + if($bi != null) + $session->setBootisoID("[".$session->getBootisoID()."] ".$bi->getTitle()); + } if($session->getMembershipID() != ''){ $personID = $membershipMapper->find($session->getMembershipID())->getPersonID(); $p = new Application_Model_Person(); $personMapper->find($personID,$p); - $session->setMembershipID("[".$session->getMembershipID()."] ".$p->getFirstname()." ".$p->getName()); - + if($p != null) + $session->setMembershipID("[".$session->getMembershipID()."] ".$p->getFirstname()." ".$p->getName()); } $session->setTime(date(Zend_Registry::get('dateformat'),$session->getTime())); $mySessions[] =$session; -- cgit v1.2.3-55-g7522 From 4d83490694be47e5d47f7221894ce88520ae2615 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 11 Apr 2011 15:26:54 +0200 Subject: login wir din fbgui angezeigt --- application/modules/fbgui/views/scripts/index/index.phtml | 1 + 1 file changed, 1 insertion(+) (limited to 'application/modules') diff --git a/application/modules/fbgui/views/scripts/index/index.phtml b/application/modules/fbgui/views/scripts/index/index.phtml index 6917643..c90468f 100644 --- a/application/modules/fbgui/views/scripts/index/index.phtml +++ b/application/modules/fbgui/views/scripts/index/index.phtml @@ -36,4 +36,5 @@
+ Goto Login to get your Bootmenu -- cgit v1.2.3-55-g7522 From fc602576ab44cdec5c91f2b95fd117b25159f2b1 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 11 Apr 2011 15:31:54 +0200 Subject: fbgui - link zum anmelden nur wenn er noch nicht angemeldet ist --- application/modules/fbgui/controllers/IndexController.php | 5 ++++- application/modules/fbgui/views/scripts/index/index.phtml | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'application/modules') diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php index 3567f70..c874d97 100644 --- a/application/modules/fbgui/controllers/IndexController.php +++ b/application/modules/fbgui/controllers/IndexController.php @@ -66,6 +66,9 @@ class Fbgui_IndexController extends Zend_Controller_Action $bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper(); $res = $bootmenuentriesMapper->findBy(array('bootmenuID' => $bootmenuID),false); $this->view->entries = $res; + if (!Zend_Auth::getInstance()->hasIdentity()) { + echo "Goto Login to get your Bootmenu"; + } } else{ /* @@ -76,7 +79,7 @@ class Fbgui_IndexController extends Zend_Controller_Action 'Your client is '.$session->getClientID(), 'there is no bootmenu for you'); */ - echo "Goto Login to get a Bootmenu"; + echo "Goto Login to get your Bootmenu"; } } else{ diff --git a/application/modules/fbgui/views/scripts/index/index.phtml b/application/modules/fbgui/views/scripts/index/index.phtml index c90468f..6917643 100644 --- a/application/modules/fbgui/views/scripts/index/index.phtml +++ b/application/modules/fbgui/views/scripts/index/index.phtml @@ -36,5 +36,4 @@
- Goto Login to get your Bootmenu -- cgit v1.2.3-55-g7522