X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Ffunctions_helpviewer.inc;h=aad1af72bdba734392a8ffa8307023c3137c990a;hb=6c554a9db47698ef2e53a257bd828fe673355346;hp=6de1627ca18661aad3271262bf7aa97b815cc163;hpb=438d46f83095a638262b2b1ad4b514e2b0a072dd;p=gosa.git diff --git a/include/functions_helpviewer.inc b/include/functions_helpviewer.inc index 6de1627ca..aad1af72b 100644 --- a/include/functions_helpviewer.inc +++ b/include/functions_helpviewer.inc @@ -49,7 +49,7 @@ class parseXml } function tag_open($parser,$tag,$attrs) { - $this->entries[$attrs['NAME']]=$attrs; + @$this->entries[$attrs['NAME']]=$attrs; } function tag_close(){; } @@ -57,20 +57,18 @@ class parseXml /* This function genereates the Index */ -function genIndex($arr) +function genIndex() { global $helpobject; $str = ""; $test = new pluglist($_SESSION['config'],NULL); + $current_hl = ""; foreach($_SESSION['helpobject']['helpconf'] as $id => $attrs){ $path = $test -> get_path($id); $exists = true; $helpdir = "../doc/guide/user/".$helpobject['lang']."/html/".preg_replace("/^.*\//i","",$path)."/"; if(!is_dir($helpdir)){ - $helpdir = "../doc/guide/user/en/html/".preg_replace("/^.*\//i","",$path)."/"; - if(!is_dir($helpdir)){ - $exists = false; - } + $exists = false; } $print_hl = false; if($current_hl != $attrs['HEADLINE']){ @@ -79,14 +77,14 @@ function genIndex($arr) } $name = $attrs['NAME']; $file = "index.html"; - $path = $plug; + //$path = $plug; if($exists){ $str .= "
"; }else{ $str .= ""._($name)." ("._("No help available for this plugin.").")
"; } } - return utf8_decode($str); + return (utf8_decode($str)); } @@ -257,7 +255,7 @@ function linkwrapper($str,$link) { $str = preg_replace("/HREF=\"http/i","target=\"_blank\" href=\"http",$str); $str = preg_replace("/HREF=\"/","href=\"".$link."?pg=",$str); -// $str=str_replace("HREF=\"","href=\"".$link."?pg=",$str); + $str=str_replace("HREF=\"","href=\"".$link."?pg=",$str); return($str); } @@ -316,7 +314,7 @@ function search($arr,$word) /* Filter in Tag results*/ if(count($matches[0])){ foreach($matches[0] as $num=>$hit){ - if(is_in_tag($arr[$key]['content'],$hit[1])) { + if(isset($arr[$keys][$key]['content']) && (is_in_tag($arr[$keys][$key]['content'],$hit[1]))){ unset($matches[0][$num]); } } @@ -384,9 +382,8 @@ function searchlist($arr,$res,$maxresults) /* appending footer message for resultlist */ $ret.= "- ".$entry['headline']." -".htmlentities(substr(strip_tags($entry['content']),0,120))."... + ".utf8_encode($entry['headline'])." -".utf8_encode(substr(strip_tags($entry['content']),0,120))."... | ".progressbar($percentage,50,8)." |
- ".htmlentities(sprintf(_("%s%% hit rate in file %s"),$percentage,$name))." + ".(sprintf(_("%s%% hit rate in file %s"),$percentage,$name))." |