From 440250246f191f1c804b35f7612aa6d070682958 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 27 Sep 2010 13:46:39 +0000 Subject: [PATCH] Updated item handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19804 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/goto/Config/class_DeviceConfig.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 a40c864a1..dccca989d 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc @@ -233,6 +233,16 @@ class DeviceConfig extends plugin $sub = get_post('subModule'); if(in_array($sub, $this->currentItemDescriptor['container'])){ + // Check if this is a valid item + if(!isset($this->itemConfig[$sub])) { + echo "Invalid item type '{$sub}'!"; + $values = array(); + }else{ + $values = $this->itemConfig[$sub]['options']; + } + $name = 'test'.rand(0,99999); + $this->addItem($sub,$name,$values); + $this->setCurrentItem($name); } } -- 2.30.2