diff options
author | Jonathan Bauer | 2012-04-27 20:19:15 +0200 |
---|---|---|
committer | Jonathan Bauer | 2012-04-27 20:19:15 +0200 |
commit | ba45546b6c2ab231a783dfa3cb27aa62d72f5d2c (patch) | |
tree | 11e0f0dfee22ad1995a685ff309111beda083fad | |
parent | gui verbessrung (diff) | |
download | pbs2-ba45546b6c2ab231a783dfa3cb27aa62d72f5d2c.tar.gz pbs2-ba45546b6c2ab231a783dfa3cb27aa62d72f5d2c.tar.xz pbs2-ba45546b6c2ab231a783dfa3cb27aa62d72f5d2c.zip |
minor (removes notices/warnings)
-rw-r--r-- | application/modules/fbgui/controllers/IndexController.php | 8 | ||||
-rw-r--r-- | library/Pbs/Filter.php | 8 |
2 files changed, 11 insertions, 5 deletions
diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php index 4658f86..34c1f13 100644 --- a/application/modules/fbgui/controllers/IndexController.php +++ b/application/modules/fbgui/controllers/IndexController.php @@ -19,7 +19,9 @@ class Fbgui_IndexController extends Zend_Controller_Action { $membershipMapper = new Application_Model_MembershipMapper(); $this->membership = new Application_Model_Membership(); - $membershipMapper->find($userIDsNamespace['membershipID'], $this->membership); + if (isset($userIDsNamespace['membershipID'])) { + $membershipMapper->find($userIDsNamespace['membershipID'], $this->membership); + } } public function errorAction() { @@ -50,8 +52,8 @@ class Fbgui_IndexController extends Zend_Controller_Action { $this->view->notification[] = Pbs_Notifier::notify('You have no membership, therefore you have no own BootMenu', 'info'); } - $d = new Pbs_Debug(); - $d->debug(array('FBGuiIndexController', $_SERVER['REMOTE_ADDR'], implode("\t", $mySession->postdata))); + //$d = new Pbs_Debug(); + //$d->debug(array('FBGuiIndexController', $_SERVER['REMOTE_ADDR'], implode("\t", $mySession->postdata))); if(isset($mySession->postdata['serialnumber'])) { // Create a session diff --git a/library/Pbs/Filter.php b/library/Pbs/Filter.php index 8a55f1b..d1b33d7 100644 --- a/library/Pbs/Filter.php +++ b/library/Pbs/Filter.php @@ -56,7 +56,9 @@ class Pbs_Filter { $sessionmapper = new Application_Model_SessionMapper(); $sessionarray = $sessionmapper->findBy(array('alphasessionID' => $_SESSION['alphasessionID']), true); $session->setOptions($sessionarray[0]); - $session->setID($sessionarray['sessionID']); + if (isset($sessionarray['sessionID'])) { + $session->setID($sessionarray['sessionID']); + } if(!isset($userIDsNamespace['membershipID'])) { $bootisoMapper = new Application_Model_BootIsoMapper(); @@ -394,7 +396,9 @@ class Pbs_Filter { foreach($result as $e) { $queryTmp[] = "filterID = '$e'"; } - $query .= implode(" OR ", $queryTmp); + if (!empty($queryTmp)) { + $query .= implode(" OR ", $queryTmp); + } $query .= 'ORDER BY priority DESC LIMIT 0,1'; $bootmenuID = 'null'; try { |