Code

Removed headpage
[gosa.git] / include / functions_helpviewer.inc
index 27846feed03e4d60403060d3bc495616718ee34d..579ede3316eb7659ae8a5be9a3890d60817dfc46 100644 (file)
@@ -67,7 +67,10 @@ function genIndex($arr)
     $exists = true;
     $helpdir = "../doc/guide/user/".$helpobject['lang']."/html/".preg_replace("/^.*\//i","",$path)."/";
     if(!is_dir($helpdir)){
-      $exists = false;
+      $helpdir = "../doc/guide/user/en/html/".preg_replace("/^.*\//i","",$path)."/";
+      if(!is_dir($helpdir)){
+        $exists = false;
+      }
     }
     $print_hl = false;
     if($current_hl != $attrs['HEADLINE']){
@@ -78,12 +81,12 @@ function genIndex($arr)
     $file = "index.html";
     $path = $plug;
     if($exists){
-      $str .= "<p style='padding-left:20px;'><a href='?plug=".$id."'><b>".$name."</b></a></p>";
+      $str .= "<p style='padding-left:20px;'><a href='?plug=".$id."'><b>"._($name)."</b></a></p>";
     }else{
-      $str .= "<p style='padding-left:20px;'><b>".$name."</b> ("._("No help available for this plugin.").")</p>";
+      $str .= "<p style='padding-left:20px;'><b>"._($name)."</b> ("._("No help available for this plugin.").")</p>";
     }
   }
-  return utf8_decode($str);
+  return (utf8_decode($str));
 }
 
 
@@ -449,14 +452,14 @@ function createResultEntry($entry,$res,$name,$max)
           <table summary=\"\"  width=\"98%\" align=\"center\">
             <tr>
               <td height=15>
-                <b>".$entry['headline']."</b> -".htmlentities(substr(strip_tags($entry['content']),0,120))."...
+                <b>".utf8_encode($entry['headline'])."</b> -".utf8_encode(substr(strip_tags($entry['content']),0,120))."...
               </td>
               <td width=50 valign=\"top\">".progressbar($percentage,50,8)."</td>
              </tr>
              <tr>
               <td colspan=2>
                 <b>
-                  ".htmlentities(sprintf(_("%s%% hit rate in file %s"),$percentage,$name))."
+                  ".(sprintf(_("%s%% hit rate in file %s"),$percentage,$name))."
                 </b>
               </td>
             </tr>