From 75288ec424d5ff225e7c009e86f31a97c3b1b6f5 Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 19 Apr 2006 07:27:08 +0000 Subject: [PATCH] Fixed gotoBootKernels to work with 'newlines' and ':' seperators git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3059 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_workstationStartup.inc | 7 +++++-- plugins/admin/systems/workstationStartup.tpl | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) 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} -- 2.30.2