From: hickert Date: Thu, 21 Oct 2010 14:43:13 +0000 (+0000) Subject: Updated list handling for packages X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ed7179c146c6b0271fc59b6cda83c61ad7c8cd30;p=gosa.git Updated list handling for packages git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20115 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/newConfigManagement/class_ConfigManagementListing.inc b/gosa-core/plugins/admin/newConfigManagement/class_ConfigManagementListing.inc index 2e0de2bed..5617bec2f 100644 --- a/gosa-core/plugins/admin/newConfigManagement/class_ConfigManagementListing.inc +++ b/gosa-core/plugins/admin/newConfigManagement/class_ConfigManagementListing.inc @@ -15,7 +15,7 @@ class ConfigManagementListing extends management $this->storagePoints = array(""); $this->rebuildListing(); - $this->distributionSelector = new ItemSelector(array('cn=root'=>'root'),"cn=root","cn=root"); + $this->distributionSelector = new ItemSelector(array(),'/root','/root'); $this->releaseSelector = new ItemSelector(array('cn=root'=>'root'),"cn=root","cn=root"); } diff --git a/gosa-core/plugins/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-core/plugins/admin/newConfigManagement/class_newConfigManagement.inc index d5d08878f..757534c3d 100644 --- a/gosa-core/plugins/admin/newConfigManagement/class_newConfigManagement.inc +++ b/gosa-core/plugins/admin/newConfigManagement/class_newConfigManagement.inc @@ -87,6 +87,15 @@ class newConfigManagement extends plugin function execute() { + $list = $this->dataModel->getItemsByType('Package'); + $rel = $this->selectedRelease; + $displayEntries = array(); + foreach($list as $entry){ + if($entry['parentPath'] == $rel){ + $displayEntries[] = $entry; + } + } + $this->listing->setDistributions($this->getDistList()); $this->listing->setReleases($this->getReleaseList()); return($this->listing->renderList()); @@ -96,16 +105,11 @@ class newConfigManagement extends plugin function getReleaseList() { $res = array(); - $res = array("cn=root" => '/'); - if(isset($this->distributionMap[$this->selectedDistribution])){ - $dist = $this->distributionMap[$this->selectedDistribution]; - $list = $this->dataModel->getItemsByType('Release'); - $this->releaseMap = array(); - foreach($list as $base => $entry){ - if($entry['parentPath'] != $dist) continue; - $res["cn={$entry['name']},cn=root"] = $entry['name']; - $this->releaseMap["cn={$entry['name']},cn=root"] = $entry['path']; - } + $dist = $this->selectedDistribution; + $list = $this->dataModel->getItemsByType('Release'); + foreach($list as $base => $entry){ + if($entry['parentPath'] != $dist) continue; + $res[$entry['path']] = $entry['name']; } return($res); } @@ -114,12 +118,9 @@ class newConfigManagement extends plugin function getDistList() { $list = $this->dataModel->getItemsByType('Distribution'); - $res = array(); - $res = array("cn=root" => ''); - $this->distributionMap = array(); + $res = array('/root/wurst' => 'wurst', '/root/tester' => 'tester'); foreach($list as $base => $entry){ - $res["cn={$entry['name']},cn=root"] = $entry['name']; - $this->distributionMap["cn={$entry['name']},cn=root"] = $entry['path']; + $res[$entry['path']] = $entry['name']; } return($res); }