summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers
diff options
context:
space:
mode:
authormichael pereira2011-04-26 18:14:39 +0200
committermichael pereira2011-04-26 18:14:39 +0200
commit842d345c3222363e12d2d97849c950b4e4862a44 (patch)
tree3f3c5af57db0f94eae8ee03ff3e7d5b485ec8086 /application/modules/user/controllers
parentconfig fix (diff)
downloadpbs2-842d345c3222363e12d2d97849c950b4e4862a44.tar.gz
pbs2-842d345c3222363e12d2d97849c950b4e4862a44.tar.xz
pbs2-842d345c3222363e12d2d97849c950b4e4862a44.zip
config fix
Diffstat (limited to 'application/modules/user/controllers')
-rw-r--r--application/modules/user/controllers/ConfigController.php20
1 files changed, 12 insertions, 8 deletions
diff --git a/application/modules/user/controllers/ConfigController.php b/application/modules/user/controllers/ConfigController.php
index bf79151..10aad3a 100644
--- a/application/modules/user/controllers/ConfigController.php
+++ b/application/modules/user/controllers/ConfigController.php
@@ -111,12 +111,14 @@ class user_ConfigController extends Zend_Controller_Action
$this->view->bootoslist[] = $b;
if(Pbs_Acl::checkRight('cc')){
$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_unique(array_merge($ownerconfs,$groupconfs));
+ if($groupID != $b->getID())
+ $groupconfs = $this->configMapper->findBy(array('groupID' => $groupID, 'membershipID' => null, 'bootosID' => $b->getID()));
+ $this->view->configlist[$b->getID()] = array_merge($ownerconfs,$groupconfs);
}else{
$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_unique(array_merge($ownerconfs,$groupconfs));
+ if($groupID != $b->getID())
+ $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){
@@ -127,12 +129,14 @@ class user_ConfigController extends Zend_Controller_Action
$this->view->bootoslist[] = $b;
if(Pbs_Acl::checkRight('cc')){
$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_unique(array_merge($ownerconfs,$groupconfs));
+ if($groupID != $b->getID())
+ $groupconfs = $this->configMapper->findBy(array('groupID' => $groupID, 'membershipID' => null, 'bootosID' => $b->getID()));
+ $this->view->configlist[$b->getID()] = array_merge($ownerconfs,$groupconfs);
}else{
$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_unique(array_merge($ownerconfs,$groupconfs));
+ if($groupID != $b->getID())
+ $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()));