From ba6f441fe01b49f2836ee182a89632d4552d34e7 Mon Sep 17 00:00:00 2001 From: michael pereira Date: Tue, 26 Apr 2011 17:54:31 +0200 Subject: config fix --- .../modules/user/controllers/ConfigController.php | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'application/modules/user/controllers/ConfigController.php') diff --git a/application/modules/user/controllers/ConfigController.php b/application/modules/user/controllers/ConfigController.php index 6c6466c..e41c23e 100644 --- a/application/modules/user/controllers/ConfigController.php +++ b/application/modules/user/controllers/ConfigController.php @@ -107,20 +107,26 @@ class user_ConfigController extends Zend_Controller_Action foreach ($bootos as $b) if($b->getPublic() - $k >= 0 ){ $this->view->bootoslist[] = $b; - if(Pbs_Acl::checkRight('cc')) - $this->view->configlist[$b->getID()] = $this->configMapper->findBy(array('membershipID' => null, 'bootosID' => $b->getID())); - else - $this->view->configlist[$b->getID()] = $this->configMapper->findBy(array('membershipID' => null, 'bootosID' => $b->getID(), 'visible' => '1')); + if(Pbs_Acl::checkRight('cc')){ + $this->view->configlist[$b->getID()] = $this->configMapper->findBy(array('groupID' => $b->getGroupID(), 'membershipID' => null, 'bootosID' => $b->getID())); + $this->view->configlist[$b->getID()] = $this->configMapper->findBy(array('groupID' => $groupID, 'membershipID' => null, 'bootosID' => $b->getID())); + }else{ + $this->view->configlist[$b->getID()] = $this->configMapper->findBy(array('groupID' => $b->getGroupID(), 'membershipID' => null, 'bootosID' => $b->getID(), 'visible' => '1')); + $this->view->configlist[$b->getID()] = $this->configMapper->findBy(array('groupID' => $groupID, 'membershipID' => null, 'bootosID' => $b->getID(), 'visible' => '1')); + } foreach ($this->view->configlist[$b->getID()] as $config){ $config->setCreated(date(Zend_Registry::get('dateformat'),$config->getCreated())); } } elseif($k == 0 && $b->getPublic() == -1 && Pbs_Acl::checkRight('boc')){ $this->view->bootoslist[] = $b; - if(Pbs_Acl::checkRight('cc')) - $this->view->configlist[$b->getID()] = $this->configMapper->findBy(array('membershipID' => null, 'bootosID' => $b->getID())); - else - $this->view->configlist[$b->getID()] = $this->configMapper->findBy(array('membershipID' => null, 'bootosID' => $b->getID(), 'visible' => '1')); + if(Pbs_Acl::checkRight('cc')){ + $this->view->configlist[$b->getID()] = $this->configMapper->findBy(array('groupID' => $b->getGroupID(), 'membershipID' => null, 'bootosID' => $b->getID())); + $this->view->configlist[$b->getID()] = $this->configMapper->findBy(array('groupID' => $groupID, 'membershipID' => null, 'bootosID' => $b->getID())); + }else{ + $this->view->configlist[$b->getID()] = $this->configMapper->findBy(array('groupID' => $b->getGroupID(), 'membershipID' => null, 'bootosID' => $b->getID(), 'visible' => '1')); + $this->view->configlist[$b->getID()] = $this->configMapper->findBy(array('groupID' => $groupID, 'membershipID' => null, 'bootosID' => $b->getID(), 'visible' => '1')); + } foreach ($this->view->configlist[$b->getID()] as $config){ $config->setCreated(date(Zend_Registry::get('dateformat'),$config->getCreated())); } -- cgit v1.2.3-55-g7522