X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Ffunctions_helpviewer.inc;h=aad1af72bdba734392a8ffa8307023c3137c990a;hb=8eff07a45d20a2e77fa60a6799da0ec2bb6938eb;hp=27846feed03e4d60403060d3bc495616718ee34d;hpb=6200b9f8eb8437568b66af49638a02cdd67a6b5e;p=gosa.git diff --git a/include/functions_helpviewer.inc b/include/functions_helpviewer.inc index 27846feed..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,11 +57,12 @@ 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; @@ -76,14 +77,14 @@ function genIndex($arr) } $name = $attrs['NAME']; $file = "index.html"; - $path = $plug; + //$path = $plug; if($exists){ - $str .= "

".$name."

"; + $str .= "

"._($name)."

"; }else{ - $str .= "

".$name." ("._("No help available for this plugin.").")

"; + $str .= "

"._($name)." ("._("No help available for this plugin.").")

"; } } - return utf8_decode($str); + return (utf8_decode($str)); } @@ -254,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); } @@ -313,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]); } } @@ -381,9 +382,8 @@ function searchlist($arr,$res,$maxresults) /* appending footer message for resultlist */ $ret.= "
- ".sprintf(_("%s results for your search with the keyword %s interpreted as %s"), + ".sprintf(_("%s results for your search with the keyword %s"), "".count($topten)."", - "".($_SESSION['search_string'])."", "".$_SESSION['parsed_search_keyword'].""); $ret.="

"; @@ -449,14 +449,14 @@ function createResultEntry($entry,$res,$name,$max) @@ -472,9 +472,13 @@ function createResultEntry($entry,$res,$name,$max) /*Simple function to detect if we prepare to change a tag or visible text */ function is_in_tag($string,$pos) { - $pos1 = strpos($string,"<",$pos); - $pos2 = strpos($string,">",$pos); - + $pos1 = $pos2 = 0; + if(preg_match("//",$string)){ + $pos2 = strpos($string,">",$pos); + } if ($pos1 > $pos2) { return(true); }else{
- ".$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))."