X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Ffunctions_helpviewer.inc;h=aad1af72bdba734392a8ffa8307023c3137c990a;hb=80c40c6d11df4b3a2d935feac0b723c017ffd935;hp=44938a19bd55726ad52719eb192e43e4347e7342;hpb=e70bc4f9de45488978032f1f2a6c16ce7e498bdf;p=gosa.git
diff --git a/include/functions_helpviewer.inc b/include/functions_helpviewer.inc
index 44938a19b..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(){; }
@@ -314,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]);
}
}
@@ -382,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.="
";
@@ -473,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)){
+ $pos1 = strpos($string,"<",$pos);
+ }
+ if(preg_match("/>/",$string)){
+ $pos2 = strpos($string,">",$pos);
+ }
if ($pos1 > $pos2) {
return(true);
}else{