From: hickert Date: Mon, 27 Sep 2010 13:46:39 +0000 (+0000) Subject: Updated item handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=440250246f191f1c804b35f7612aa6d070682958;p=gosa.git Updated item handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19804 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 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); } }