summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/BootosController.php
diff options
context:
space:
mode:
authormichael pereira2011-04-06 00:42:25 +0200
committermichael pereira2011-04-06 00:42:25 +0200
commit87a4025046e739df02bf07f931a3e87dc7ca8a41 (patch)
tree3edb663b624be93ed85240ab23fb2def85b2d966 /application/modules/user/controllers/BootosController.php
parentMerge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff)
downloadpbs2-87a4025046e739df02bf07f931a3e87dc7ca8a41.tar.gz
pbs2-87a4025046e739df02bf07f931a3e87dc7ca8a41.tar.xz
pbs2-87a4025046e739df02bf07f931a3e87dc7ca8a41.zip
bootmenu fix
Diffstat (limited to 'application/modules/user/controllers/BootosController.php')
-rw-r--r--application/modules/user/controllers/BootosController.php27
1 files changed, 20 insertions, 7 deletions
diff --git a/application/modules/user/controllers/BootosController.php b/application/modules/user/controllers/BootosController.php
index 04324ef..59efff0 100644
--- a/application/modules/user/controllers/BootosController.php
+++ b/application/modules/user/controllers/BootosController.php
@@ -52,20 +52,29 @@ class user_BootosController extends Zend_Controller_Action
$this->view->notification = $pbsNotifier->notify('update',$result);
}
- $groupMapper = new Application_Model_GroupMapper();
- $personMapper = new Application_Model_PersonMapper();
-
$groupID = $this->membership->getGroupID();
//ACL Darf er BootOs sehen?
if(!Pbs_Acl::checkRight('boai') && !Pbs_Acl::checkRight('boui'))
$this->_redirect('/user/index');
-
- $configMapper = new Application_Model_ConfigMapper();
+
+ $groupgroupsMapper = new Application_Model_GroupGroupsMapper();
- $this->view->bootoslist = $this->bootosMapper->findBy(array("groupID" => $groupID));
- $this->view->update = array();
+ $parents = array();
+ $this->view->bootoslist = array();
+ $parents = $groupgroupsMapper->getParentGroups($groupID);
+
+ foreach($parents as $k => $parent){
+ foreach($parent as $p){
+ $bootos = $this->bootosMapper->findBy(array("groupID" => $p));
+ foreach ($bootos as $b)
+ if($b->getPublic() - $k >= 0 )
+ $this->view->bootoslist[] = $b;
+ }
+ }
+ $this->view->bootoslist = array_reverse($this->view->bootoslist);
+
// Search
$search = $this->_request->getParam('search');
$mySearch = new Pbs_Search();
@@ -88,7 +97,11 @@ class user_BootosController extends Zend_Controller_Action
$this->view->pagination = $pagination->pagination($pageurl);
$this->view->page = $pagination->getRequestPage();
+ $this->view->update = array();
$update = $this->_request->getParam('checkupdate');
+ $groupMapper = new Application_Model_GroupMapper();
+ $configMapper = new Application_Model_ConfigMapper();
+
if(count($this->view->bootoslist)>0){
foreach ($this->view->bootoslist as $bootos){