From a38dac07173c81dbc4f05a4f94726b57b0c2fc15 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 30 Sep 2010 11:26:28 +0000 Subject: [PATCH] Updated device handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19868 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/Config/class_DeviceConfig.inc | 7 +++++- .../goto/Config/class_ItemSelector.inc | 25 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 gosa-plugins/goto/admin/systems/goto/Config/class_ItemSelector.inc 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 9f06dbd81..afbfc4144 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc @@ -148,6 +148,11 @@ class DeviceConfig extends management $base = (isset($current['base']))? ",".$current['base'] : ''; $base = "{$type}={$name}{$base}"; + + if(isset($this->mappingBaseToID[$base])){ + echo "Cannot add entry, dn already in use! {$base}
"; + return(null); + } // Get next free item slot. $id = count($this->allConfiguredItems); @@ -240,7 +245,7 @@ class DeviceConfig extends management // Collect item container list to be able to render the fake-base selector if(!$this->itemContainerSelector){ - $this->itemContainerSelector = new releaseSelector( + $this->itemContainerSelector = new ItemSelector( $this->getContainerList(), $this->base, $this->allConfiguredItems[0]['base']); diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_ItemSelector.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_ItemSelector.inc new file mode 100644 index 000000000..f4186de38 --- /dev/null +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_ItemSelector.inc @@ -0,0 +1,25 @@ + -- 2.30.2