From: hickert Date: Thu, 30 Sep 2010 09:15:42 +0000 (+0000) Subject: Updated base handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f7d14186567d8bb902744a3076d5a5e3ed8d75fa;p=gosa.git Updated base handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19864 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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 *