summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rwxr-xr-xapplication/controllers/ResourceController.php23
1 files changed, 22 insertions, 1 deletions
diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php
index f47cd62..cd661c6 100755
--- a/application/controllers/ResourceController.php
+++ b/application/controllers/ResourceController.php
@@ -886,6 +886,8 @@ public function editbootosAction()
}
} else {
$bootos = $bootosMapper->findBy(array('groupid' => $groupID));
+ $childBootos = $this->getbootosOfChildGroups($groupID, 1);
+ $bootos = array_merge($bootos, $childBootos);
}
if($bootos == null){
@@ -942,6 +944,25 @@ public function editbootosAction()
echo $xml;
}
+ private function getbootosOfChildGroups($groupID, $depth) {
+ $groupgroupsMapper = new Application_Model_GroupGroupsMapper();
+ $results = $groupgroupsMapper->findBy(array('parentID' => $groupID));
+ $bootosMapper = new Application_Model_BootOsMapper();
+ if(count($results)) {
+ $bootos = array();
+ foreach($results as $result) {
+ $newbootos = $bootosMapper->findBy(array("groupID" => $result->getGroupID(), "public" => $depth));
+ if(count($newbootos)) {
+ $bootos = array_merge($bootos, $newbootos);
+ }
+ $bootos = array_merge($bootos, $this->getbootosOfChildGroups($result->getGroupID(), $depth + 1));
+ }
+ return $bootos;
+ } else {
+ return array();
+ }
+ }
+
public function getpoolAction() {
list($rightroles1) = $this->rightrolesMapper->findBy(array('rightID' => '79', 'roleID' => $this->membership->getRoleID()));
if($rightroles1 == null){
@@ -1376,4 +1397,4 @@ public function editbootosAction()
return $path;
}
-} \ No newline at end of file
+}