From 27dbf6ad0cb933b3da8691be78592062eb4e257a Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 22 Oct 2010 10:16:53 +0000 Subject: [PATCH] Updated config Management List git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20123 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../class_ConfigManagementListing.inc | 2 +- .../class_filterConfigManagement.inc | 1 + .../class_newConfigManagement.inc | 21 +++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/gosa-core/plugins/admin/newConfigManagement/class_ConfigManagementListing.inc b/gosa-core/plugins/admin/newConfigManagement/class_ConfigManagementListing.inc index cfaf42775..bad03f55b 100644 --- a/gosa-core/plugins/admin/newConfigManagement/class_ConfigManagementListing.inc +++ b/gosa-core/plugins/admin/newConfigManagement/class_ConfigManagementListing.inc @@ -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() diff --git a/gosa-core/plugins/admin/newConfigManagement/class_filterConfigManagement.inc b/gosa-core/plugins/admin/newConfigManagement/class_filterConfigManagement.inc index e6e431347..306e386ae 100644 --- a/gosa-core/plugins/admin/newConfigManagement/class_filterConfigManagement.inc +++ b/gosa-core/plugins/admin/newConfigManagement/class_filterConfigManagement.inc @@ -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); diff --git a/gosa-core/plugins/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-core/plugins/admin/newConfigManagement/class_newConfigManagement.inc index adb8ddf20..52b129e1b 100644 --- a/gosa-core/plugins/admin/newConfigManagement/class_newConfigManagement.inc +++ b/gosa-core/plugins/admin/newConfigManagement/class_newConfigManagement.inc @@ -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() { } -- 2.30.2