Code

Fixed gotoBootKernels to work with 'newlines' and ':' seperators
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 Apr 2006 07:27:08 +0000 (07:27 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 Apr 2006 07:27:08 +0000 (07:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3059 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_workstationStartup.inc
plugins/admin/systems/workstationStartup.tpl

index 54929b931d63b9f440502c39f5f141f4a7b26f3b..9c12a77f64930f8e7e1a42c7044a9baa72ad73a2 100644 (file)
@@ -231,8 +231,11 @@ class workstartup extends plugin
       } else {
         $fh= popen($command, "r");
         while (!feof($fh)) {
-          $buffer= fgets($fh, 256);
-          $this->gotoBootKernels[]= $buffer;
+          $buffer= trim(fgets($fh, 256));
+          
+          if ($buffer != ""){
+            $this->gotoBootKernels[preg_replace('/:.*$/', '', $buffer)]= $buffer;
+          }
         }
         pclose($fh);
         sort($this->gotoBootKernels);
index 98c709cca9cc3808fa988aa96456465485a4f277..ae77f1aec841ea209d097e37d2d8e8e3c48d6eea 100644 (file)
@@ -12,8 +12,8 @@
     <tr>
      <td><LABEL for="gotoBootKernel">{t}Boot kernel{/t}</LABEL></td>
      <td style="width:70%">
-        <select id="gotoBootKernel" name="gotoBootKernel" {$gotoBootKernelACL} onchange='document.mainform.submit()'>
-         {html_options values=$gotoBootKernels output=$gotoBootKernels selected=$gotoBootKernel}
+        <select id="gotoBootKernel" name="gotoBootKernel" {$gotoBootKernelACL}>
+         {html_options options=$gotoBootKernels selected=$gotoBootKernel}
          <option disabled>&nbsp;</option>
        </select>
       </td>