Code

Updated list handling for packages
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 21 Oct 2010 14:43:13 +0000 (14:43 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 21 Oct 2010 14:43:13 +0000 (14:43 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20115 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/newConfigManagement/class_ConfigManagementListing.inc
gosa-core/plugins/admin/newConfigManagement/class_newConfigManagement.inc

index 2e0de2bed2b4232c4d5f2fbb3aecebc01894a984..5617bec2fd089ce655b7a9473d361966efceb7b4 100644 (file)
@@ -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");
     }
 
index d5d08878f0c57e3e18197b89e00682fbe39caf49..757534c3d0e2bae94062bb6c39657e4fc884c252 100644 (file)
@@ -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);
     }