summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/ConfigController.php
diff options
context:
space:
mode:
authormichael pereira2011-04-26 18:03:33 +0200
committermichael pereira2011-04-26 18:03:33 +0200
commit1fb7070e2f16e2531df776829e12938f0ce00509 (patch)
treee6f7c9375c2f33ebc354268fb022407ecbe3147b /application/modules/user/controllers/ConfigController.php
parentMerge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff)
downloadpbs2-1fb7070e2f16e2531df776829e12938f0ce00509.tar.gz
pbs2-1fb7070e2f16e2531df776829e12938f0ce00509.tar.xz
pbs2-1fb7070e2f16e2531df776829e12938f0ce00509.zip
config fix
Diffstat (limited to 'application/modules/user/controllers/ConfigController.php')
-rw-r--r--application/modules/user/controllers/ConfigController.php23
1 files changed, 15 insertions, 8 deletions
diff --git a/application/modules/user/controllers/ConfigController.php b/application/modules/user/controllers/ConfigController.php
index e41c23e..bb01158 100644
--- a/application/modules/user/controllers/ConfigController.php
+++ b/application/modules/user/controllers/ConfigController.php
@@ -99,6 +99,8 @@ class user_ConfigController extends Zend_Controller_Action
$groupgroupsMapper = new Application_Model_GroupGroupsMapper();
$parents = array();
+ $groupconfs = array();
+ $ownerconfs = array();
$parents = $groupgroupsMapper->getParentGroups($groupID);
foreach($parents as $k => $parent){
@@ -108,11 +110,14 @@ class user_ConfigController extends Zend_Controller_Action
if($b->getPublic() - $k >= 0 ){
$this->view->bootoslist[] = $b;
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()));
+ $ownerconfs = $this->configMapper->findBy(array('groupID' => $b->getGroupID(), 'membershipID' => null, 'bootosID' => $b->getID()));
+ $groupconfs = $this->configMapper->findBy(array('groupID' => $groupID, 'membershipID' => null, 'bootosID' => $b->getID()));
+ $this->view->configlist[$b->getID()] = array_merge($ownerconfs,$groupconfs);
}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'));
+ $ownerconfs = $this->configMapper->findBy(array('groupID' => $b->getGroupID(), 'membershipID' => null, 'bootosID' => $b->getID(), 'visible' => '1'));
+ $groupconfs = $this->configMapper->findBy(array('groupID' => $groupID, 'membershipID' => null, 'bootosID' => $b->getID(), 'visible' => '1'));
+ $this->view->configlist[$b->getID()] = array_merge($ownerconfs,$groupconfs);
+
}
foreach ($this->view->configlist[$b->getID()] as $config){
$config->setCreated(date(Zend_Registry::get('dateformat'),$config->getCreated()));
@@ -121,11 +126,13 @@ class user_ConfigController extends Zend_Controller_Action
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('groupID' => $b->getGroupID(), 'membershipID' => null, 'bootosID' => $b->getID()));
- $this->view->configlist[$b->getID()] = $this->configMapper->findBy(array('groupID' => $groupID, 'membershipID' => null, 'bootosID' => $b->getID()));
+ $ownerconfs = $this->configMapper->findBy(array('groupID' => $b->getGroupID(), 'membershipID' => null, 'bootosID' => $b->getID()));
+ $groupconfs = $this->configMapper->findBy(array('groupID' => $groupID, 'membershipID' => null, 'bootosID' => $b->getID()));
+ $this->view->configlist[$b->getID()] = array_merge($ownerconfs,$groupconfs);
}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'));
+ $ownerconfs = $this->configMapper->findBy(array('groupID' => $b->getGroupID(), 'membershipID' => null, 'bootosID' => $b->getID(), 'visible' => '1'));
+ $groupconfs = $this->configMapper->findBy(array('groupID' => $groupID, 'membershipID' => null, 'bootosID' => $b->getID(), 'visible' => '1'));
+ $this->view->configlist[$b->getID()] = array_merge($ownerconfs,$groupconfs);
}
foreach ($this->view->configlist[$b->getID()] as $config){
$config->setCreated(date(Zend_Registry::get('dateformat'),$config->getCreated()));