From: cajus Date: Wed, 19 Apr 2006 07:27:08 +0000 (+0000) Subject: Fixed gotoBootKernels to work with 'newlines' and ':' seperators X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=75288ec424d5ff225e7c009e86f31a97c3b1b6f5;p=gosa.git Fixed gotoBootKernels to work with 'newlines' and ':' seperators git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3059 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index 54929b931..9c12a77f6 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -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); diff --git a/plugins/admin/systems/workstationStartup.tpl b/plugins/admin/systems/workstationStartup.tpl index 98c709cca..ae77f1aec 100644 --- a/plugins/admin/systems/workstationStartup.tpl +++ b/plugins/admin/systems/workstationStartup.tpl @@ -12,8 +12,8 @@ - + {html_options options=$gotoBootKernels selected=$gotoBootKernel}