diff options
author | michael pereira | 2011-10-10 02:57:04 +0200 |
---|---|---|
committer | michael pereira | 2011-10-10 02:57:04 +0200 |
commit | b5675c099a8b71584bd319ad5ee7d2d046aeb6e7 (patch) | |
tree | 732e2222706bc610c705ecb38bc02a1ce111aecf | |
parent | filter typo (diff) | |
download | pbs2-b5675c099a8b71584bd319ad5ee7d2d046aeb6e7.tar.gz pbs2-b5675c099a8b71584bd319ad5ee7d2d046aeb6e7.tar.xz pbs2-b5675c099a8b71584bd319ad5ee7d2d046aeb6e7.zip |
filter group fix
-rw-r--r-- | library/Pbs/Filter.php | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/library/Pbs/Filter.php b/library/Pbs/Filter.php index 145e7f5..219e50e 100644 --- a/library/Pbs/Filter.php +++ b/library/Pbs/Filter.php @@ -11,8 +11,7 @@ class Pbs_Filter{ $db = $this->db; $debuglevel = 3; - $userIDsNamespace = Zend_Session::namespaceGet('userIDs'); - print_a($userIDsNamespace['membershipID']); + $userIDsNamespace = Zend_Session::namespaceGet('userIDs'); $membershipMapper = new Application_Model_MembershipMapper(); $this->membership = new Application_Model_Membership(); @@ -22,6 +21,7 @@ class Pbs_Filter{ else{ $this->membership->setID(null); } + // For Testing Filters $testFilter = (isset($_POST['submit']))?true:false; @@ -53,18 +53,21 @@ class Pbs_Filter{ try{ $set = array(); - $session = new Application_Model_Session(); $sessionmapper = new Application_Model_SessionMapper(); $sessionarray = $sessionmapper->findBy(array('alphasessionID' => $_SESSION['alphasessionID']),true); $session->setOptions($sessionarray[0]); $session->setID($sessionarray['sessionID']); - - $bootisoMapper = new Application_Model_BootIsoMapper(); - $bootiso = new Application_Model_BootIso(); - $bootisoMapper->find($session->getBootisoID(),$bootiso); - $groupID = $bootiso->getGroupID(); + + if(!isset($userIDsNamespace['membershipID'])){ + $bootisoMapper = new Application_Model_BootIsoMapper(); + $bootiso = new Application_Model_BootIso(); + $bootisoMapper->find($session->getBootisoID(),$bootiso); + $groupID = $bootiso->getGroupID(); + }else{ + $groupID = $userIDsNamespace['groupID']; + } ######################################################### // IP Adress |