Code

Applied patch from 2.5 Revision: 6518
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 4 Jun 2007 10:23:45 +0000 (10:23 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 4 Jun 2007 10:23:45 +0000 (10:23 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6530 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_environment.inc
plugins/personal/environment/environment.tpl

index d0ffa94848cdaad342da541f07cc22211f020f04..64aabc4dfc93cf1ad55595840347c43271fffa93 100644 (file)
@@ -715,9 +715,9 @@ class environment extends plugin
     }
 
     /* We have to delete the selected hotplug from the list*/
-    if((isset($_POST['gotoHotplugDeviceDel']))&&(isset($_POST['gotoHotplugDevice'])) && $this->acl_is_writeable("gotoHotplugDevice")){
+    if((isset($_POST['gotoHotplugDeviceDel']))&&(isset($_POST['gotoHotplugDevice_post'])) && $this->acl_is_writeable("gotoHotplugDevice")){
       if($this->acl_is_writeable("gotoHotplugDevice")){
-        foreach($_POST['gotoHotplugDevice'] as $name){
+        foreach($_POST['gotoHotplugDevice_post'] as $name){
           unset($this->gotoHotplugDevices[$name]);
         }
       }
@@ -1143,8 +1143,12 @@ class environment extends plugin
     /* Prepare HotPlug devices */
     $this->attrs['gotoHotplugDevice'] = array();
     foreach($this->gotoHotplugDevices as $name => $device){
-      $this->attrs['gotoHotplugDevice'][] = $device['name']."|".$device['description']."|".$device['id'].
-        "|".$device['produkt']."|".$device['vendor'];
+
+      $tmp= $device['name']."|".$device['description']."|".$device['id'];
+      if (isset($device['produkt']) && isset($device['vendor'])){
+        $tmp.= "|".$device['produkt']."|".$device['vendor'];
+      }
+      $this->attrs['gotoHotplugDevice'][]= $tmp;
     }
 
     /* Prepare LogonScripts */
index 2763b7e4fe7479097c9fcdef1017deb6b5370c02..47131474dd9539fe7037cb003dd8b89a9f447966 100644 (file)
   <td style="border-right:1px solid #B0B0B0; width:50%; vertical-align:top">
    <h2>
     <img alt="" src="images/hotplug.png" align="middle" class="center" />&nbsp;
-    <label for="gotoHotplugDevice">{t}Hotplug devices{/t}</label>
+    <label for="gotoHotplugDevice_post">{t}Hotplug devices{/t}</label>
    </h2> 
    <table style="width:100%" summary="{t}Hotplug device settings{/t}">
     <tr>
      <td>
 {render acl=$gotoHotplugDeviceACL}
-      <select name="gotoHotplugDevice[]" size=5  style="width:100%;" id="gotoHotplugDevice" multiple>
+      <select name="gotoHotplugDevice_post[]" size=5  style="width:100%;" id="gotoHotplugDevice_post" multiple>
        {html_options values=$gotoHotplugDeviceKeys output=$gotoHotplugDevices}
        <option disabled>&nbsp;</option>
       </select>