From: hickert Date: Wed, 31 May 2006 03:44:08 +0000 (+0000) Subject: Made hotplug devices [] multiple X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e93f31aa3a7ab58b22142f57e407aace6fa22224;p=gosa.git Made hotplug devices [] multiple git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3568 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index be9e18f04..dd9342cef 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -603,8 +603,11 @@ class environment extends plugin }else{ $this->dialog->save_object(); $a_tmp = $this->dialog->save(); + if(is_array($a_tmp)){ - $this->gotoHotplugDevices[$a_tmp['name']]= $a_tmp; + foreach($a_tmp as $name => $hotplug){ + $this->gotoHotplugDevices[$name]= $hotplug; + } } unset($this->dialog); $this->dialog= NULL; diff --git a/plugins/personal/environment/class_hotplugDialog.inc b/plugins/personal/environment/class_hotplugDialog.inc index eb013741f..a965e3c64 100644 --- a/plugins/personal/environment/class_hotplugDialog.inc +++ b/plugins/personal/environment/class_hotplugDialog.inc @@ -141,14 +141,16 @@ class hotplugDialog extends plugin /* return generated entry from input fields*/ if(!$this->use_existing){ $a_return=array(); - $a_return['name']= $this->HOT_name; - $a_return['description']= $this->HOT_description; - $a_return['id']= $this->HOT_id; + $a_return[$this->HOT_name]['name']= $this->HOT_name; + $a_return[$this->HOT_name]['description']= $this->HOT_description; + $a_return[$this->HOT_name]['id']= $this->HOT_id; return($a_return); }else{ - //return selected entry from select box - $entry = $this->hotplugDeviceList[$_POST['hotplugName']]; - return $entry; + $entries = array(); + foreach($_POST['hotplugName'] as $name){ + $entries[$name] = $this->hotplugDeviceList[$name]; + } + return $entries; } } diff --git a/plugins/personal/environment/hotplugDialog.tpl b/plugins/personal/environment/hotplugDialog.tpl index 77e0408c1..ddc810599 100644 --- a/plugins/personal/environment/hotplugDialog.tpl +++ b/plugins/personal/environment/hotplugDialog.tpl @@ -12,8 +12,8 @@

- + {html_options values=$hotplugDeviceKeys output=$hotplugDevices}