From 8f5f06cf792c57bc452b48dbb05662e382718275 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 28 Mar 2008 14:12:38 +0000 Subject: [PATCH] * Fixed "add" buttons * Fixed error when pressing "add" without selecting something git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10058 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/personal/environment/class_hotplugDialog.inc | 7 +++++-- gosa-plugins/goto/personal/environment/hotplugDialog.tpl | 2 +- .../goto/personal/environment/selectPrinterDialog.tpl | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gosa-plugins/goto/personal/environment/class_hotplugDialog.inc b/gosa-plugins/goto/personal/environment/class_hotplugDialog.inc index b00281b82..50e571941 100644 --- a/gosa-plugins/goto/personal/environment/class_hotplugDialog.inc +++ b/gosa-plugins/goto/personal/environment/class_hotplugDialog.inc @@ -61,9 +61,12 @@ class hotplugDialog extends plugin function save() { $entries = array(); - foreach($_POST['hotplugName'] as $name){ - $entries[$name] = $this->hotplugDeviceList[$name]; + if (isset($_POST['hotplugName'])){ + foreach($_POST['hotplugName'] as $name){ + $entries[$name] = $this->hotplugDeviceList[$name]; + } } + return $entries; } diff --git a/gosa-plugins/goto/personal/environment/hotplugDialog.tpl b/gosa-plugins/goto/personal/environment/hotplugDialog.tpl index fd16778f0..801421c61 100644 --- a/gosa-plugins/goto/personal/environment/hotplugDialog.tpl +++ b/gosa-plugins/goto/personal/environment/hotplugDialog.tpl @@ -60,7 +60,7 @@

 

- +