index d41c4457b7ed1bcb70b01e07c70c3789e2ee73de..aad1af72bdba734392a8ffa8307023c3137c990a 100644 (file)
}
function tag_open($parser,$tag,$attrs)
{
- $this->entries[$attrs['NAME']]=$attrs;
+ @$this->entries[$attrs['NAME']]=$attrs;
}
function tag_close(){; }
/* 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']){
}
$name = $attrs['NAME'];
$file = "index.html";
- $path = $plug;
+ //$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));
}
{
$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);
}
/* 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]);
}
}
/* appending footer message for resultlist */
$ret.= "<br>
- ".sprintf(_("%s results for your search with the keyword %s interpreted as %s"),
+ ".sprintf(_("%s results for your search with the keyword %s"),
"<b>".count($topten)."</b>",
- "<b>".($_SESSION['search_string'])."</b>",
"<b>".$_SESSION['parsed_search_keyword']."</b>");
$ret.="<br>
<br>";
<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>
/*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{