Code

Updated config Management List
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 22 Oct 2010 10:16:53 +0000 (10:16 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 22 Oct 2010 10:16:53 +0000 (10:16 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20123 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index cfaf427758929671a7b416cf7e5eda6b9effbec6..bad03f55bfa41253ca365623b3b17cf166fd3340 100644 (file)
@@ -16,7 +16,7 @@ class ConfigManagementListing extends management
         $this->rebuildListing();
 
         $this->distributionSelector = new ItemSelector(array(),'/root','/root');
-        $this->releaseSelector = new ItemSelector(array('cn=root'=>'root'),"cn=root","cn=root");
+        $this->releaseSelector = new ItemSelector(array(),'/root','/root');
     }
 
     function save_object()
index e6e4313474d34624e7937716c4e380487a8369f6..306e386ae7b524c36d05b0a7b57bc5bb2552f211 100644 (file)
@@ -10,6 +10,7 @@ class filterConfigManagement {
         // Walk through the data array till we reach the correct level, then 
         //  create the list of entries.
         $data = session::get('CONFIG_ITEM');
+        if(!$data) return(array());
 
         // Prepare filter, strip out regex regex related chars, except for *
         $filter = preg_replace('/\*/','____STAR____', $filter);
index adb8ddf201a8d7f62778188008eca12f025c76c7..52b129e1b93aad51b24477a036ebb85a5b381039 100644 (file)
@@ -133,6 +133,8 @@ class newConfigManagement extends plugin
      */
     function getReleaseList()
     {
+        $data = $this->dataModel->getItemByPath('/root');
+        return($this->__recurseItem($data));
         $res = array();
         $dist = $this->selectedDistribution;
         $list = $this->dataModel->getItemsByType('Release');
@@ -150,6 +152,11 @@ class newConfigManagement extends plugin
      */
     function getDistList()
     {
+
+        $data = $this->dataModel->getItemByPath('/root');
+        return($this->__recurseItem($data));
+       
+
         $list = $this->dataModel->getItemsByType('Distribution');
         $res = array();
         foreach($list as $base => $entry){
@@ -159,6 +166,20 @@ class newConfigManagement extends plugin
     }
     
 
+    function __recurseItem($item)
+    {
+        $res = array();
+        $res[$item['path']] = $item['name'];
+        if(count($item['children'])){
+            foreach($item['children'] as $child){
+                $res = array_merge($res, $this->__recurseItem($child));
+            }
+        }
+        return($res);
+    }
+
+
+
     function remove_lock()
     {
     }