index 44938a19bd55726ad52719eb192e43e4347e7342..ab9b3a1d7c8a87cfe72d586f8cb4854c269e88ac 100644 (file)
}
function tag_open($parser,$tag,$attrs)
{
}
function tag_open($parser,$tag,$attrs)
{
- $this->entries[$attrs['NAME']]=$attrs;
+ @$this->entries[$attrs['NAME']]=$attrs;
}
function tag_close(){; }
}
function tag_close(){; }
unset($_SESSION['parsed_search_keyword']);
$_SESSION['parsed_search_keyword']="";
unset($_SESSION['parsed_search_keyword']);
$_SESSION['parsed_search_keyword']="";
- error_reporting(E_ALL);
+ error_reporting(E_ALL | E_STRICT);
/* prepare searchwords */
$word = trim($word);
/* prepare searchwords */
$word = trim($word);
/* Filter in Tag results*/
if(count($matches[0])){
foreach($matches[0] as $num=>$hit){
/* 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]);
}
}
unset($matches[0][$num]);
}
}
/* appending footer message for resultlist */
$ret.= "<br>
/* 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>".count($topten)."</b>",
- "<b>".($_SESSION['search_string'])."</b>",
"<b>".$_SESSION['parsed_search_keyword']."</b>");
$ret.="<br>
<br>";
"<b>".$_SESSION['parsed_search_keyword']."</b>");
$ret.="<br>
<br>";
/*Simple function to detect if we prepare to change a tag or visible text */
function is_in_tag($string,$pos)
{
/*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{
if ($pos1 > $pos2) {
return(true);
}else{