From f7d14186567d8bb902744a3076d5a5e3ed8d75fa Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 30 Sep 2010 09:15:42 +0000 Subject: [PATCH] Updated base handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19864 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/admin/systems/goto/Config/class_DeviceConfig.inc | 2 +- .../admin/systems/goto/Config/class_filterDeviceItems.inc | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc index 24373b044..d0b7ee41a 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc @@ -316,7 +316,7 @@ class DeviceConfig extends management $this->idToName[] = $name; $base = (isset($current['base']))? ",".$current['base'] : ''; - $base = "cn={$name}{$base}"; + $base = "{$type}={$name}{$base}"; $new = array( 'base' => $base, diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc index a27342365..f4ac031e6 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc @@ -7,8 +7,11 @@ class filterDeviceItems { // Walk through the data array till we reach the correct level, then // create the list of entries. $data = session::get('DEVICE_ITEMS'); - foreach(array_reverse(preg_split("/[,]*cn=/", $base,0,PREG_SPLIT_NO_EMPTY)) as $name){ - $data = $data[$name]['children']; + foreach($data as $id => $item){ + if($item['base'] == $base){ + $data = $item['children']; + break;; + } } // Prepare filter, strip out regex regex related chars, except for * -- 2.30.2