From 0e330c6a83531540ee3028bcd30941d8a0dc4b88 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 11 May 2010 12:37:43 +0000 Subject: [PATCH] Updated tempalte git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18370 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../addons/configViewer/class_commandVerifier.inc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gosa-core/plugins/addons/configViewer/class_commandVerifier.inc b/gosa-core/plugins/addons/configViewer/class_commandVerifier.inc index 952ccdb4f..92244ca9e 100644 --- a/gosa-core/plugins/addons/configViewer/class_commandVerifier.inc +++ b/gosa-core/plugins/addons/configViewer/class_commandVerifier.inc @@ -22,16 +22,20 @@ class commandVerifier $process = proc_open($this->command, $descriptorspec, $pipes); if (is_resource($process)) { $send= stream_get_contents($pipes[0]); - $res = htmlentities(stream_get_contents($pipes[1]),ENT_COMPAT,'UTF-8'); - $err = htmlentities(stream_get_contents($pipes[2]),ENT_COMPAT,'UTF-8'); + $res = trim(htmlentities(stream_get_contents($pipes[1]),ENT_COMPAT,'UTF-8')); + $err = trim(htmlentities(stream_get_contents($pipes[2]),ENT_COMPAT,'UTF-8')); fclose($pipes[0]); fclose($pipes[1]); fclose($pipes[2]); $code = proc_close($process); + + if(!empty($err)) $err = "
{$err}
"; + if(!empty($res)) $res = "
{$res}
"; + $output = " - - + +
Result:
$res
Error:
$err
Result:$res
Error:$err
Return code:$code
"; } -- 2.30.2