From 67a1bb7081e963ea17e0be2e8935d61abbfeb053 Mon Sep 17 00:00:00 2001 From: opensides Date: Sun, 10 Feb 2008 15:38:34 +0000 Subject: [PATCH] - Forgot to include modified helpviewer ;-( git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@8795 594d385d-05f5-0310-b6e9-bd551577e9d8 --- html/helpviewer.php | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/html/helpviewer.php b/html/helpviewer.php index 511dc0667..f3565cce1 100644 --- a/html/helpviewer.php +++ b/html/helpviewer.php @@ -38,14 +38,7 @@ if (!isset($_SESSION['config'])){ exit; } -/* Language setup */ -if ($config->data['MAIN']['LANG'] == ""){ - $lang= get_browser_language(); -} else { - $lang= $config->data['MAIN']['LANG']; -} - -$lang.=".UTF-8"; +$lang= get_browser_language(); putenv("LANGUAGE="); putenv("LANG=$lang"); @@ -120,9 +113,9 @@ if(isset($_SESSION['current_class_for_help'])){ $display= ( $header.$smarty->fetch(get_template_path('help.tpl'))); echo $display; unset($_SESSION['current_class_for_help']); - exit(); + exit(); } - + /* Save filename */ $helpobject['file']= $str[($_SESSION['current_class_for_help'])]['FILE']; @@ -181,9 +174,11 @@ $_SESSION['helpobject'] = $helpobject; * Display management */ +/* this raise a warning if the directory is not found */ + $files = array(); -$f = opendir($helpdir); -while($file = readdir($f)){ +$f = @opendir($helpdir); +while($file = @readdir($f)){ $files[$file]=$file; } @@ -226,7 +221,7 @@ if(isset($_POST['search'])){ $header= "".$smarty->fetch(get_template_path('headers.tpl')); /* I don't know why, but we must use utf8_encode to avoid dispplay errors */ - $display= ( $header.$smarty->fetch(get_template_path('help.tpl'))); + $display= utf8_encode( $header.$smarty->fetch(get_template_path('help.tpl'))); echo $display; }elseif(((empty($helpdir)))||($helpdir=="/")){ /* Generate Index and display it */ -- 2.30.2