X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Ffunctions_helpviewer.inc;h=437ffe12e1a649bd63bccc83c458e343497d65be;hb=c9bd6c4d92532063a9dd8df3cfd20740d43e5841;hp=a44a06d0d2caf8bfcc6e2dbc4e7a111b7d95632a;hpb=f7bd29eeb2f192eaa659b0cb7799506f4c1abf68;p=gosa.git diff --git a/gosa-core/include/functions_helpviewer.inc b/gosa-core/include/functions_helpviewer.inc index a44a06d0d..437ffe12e 100644 --- a/gosa-core/include/functions_helpviewer.inc +++ b/gosa-core/include/functions_helpviewer.inc @@ -42,9 +42,9 @@ class parseXml $xmldata= fread($fh, 100000); fclose($fh); if(!xml_parse($this->parser, chop($xmldata))){ - print(sprintf(_("XML error in guide.xml: %s at line %d"), - xml_error_string(xml_get_error_code($this->parser)), - xml_get_current_line_number($this->parser))); + print(sprintf(_("XML error in guide.xml: %s at line %s"), + bold(xml_error_string(xml_get_error_code($this->parser))), + bold(xml_get_current_line_number($this->parser)))); exit; } return($this->entries); @@ -63,9 +63,9 @@ function genIndex() { global $helpobject; $str = ""; - $config = session::get('config'); - $helpobject = session::get('helpobject'); - $test = new pluglist($config,get_userinfo()); + $helpobject = session::global_get('helpobject'); + $ui= get_userinfo(); + $test = new pluglist(session::global_get('config'), $ui); $current_hl = ""; foreach($helpobject['helpconf'] as $id => $attrs){ $path = $test -> get_path($id); @@ -258,8 +258,7 @@ function remove_unwanted_tags($str,$replacements) 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); } @@ -285,7 +284,7 @@ function search($arr,$word) /* Filter all unusable chars */ $word = preg_replace($allowed_chars_in_searchword,"",$word); - $words = split(" ",str_replace("+"," ",$word)); + $words = explode(" ",str_replace("+"," ",$word)); /* Check all wordlengths */ foreach($words as $tryword){ @@ -377,7 +376,7 @@ function searchlist($arr,$res,$maxresults) /* Foreach */ foreach($topten as $key => $hits) { - $ks = split("\/",$key); + $ks = explode("/",$key); $k1 = $ks[0]; $k2 = $ks[1]; @@ -387,8 +386,8 @@ function searchlist($arr,$res,$maxresults) /* appending footer message for resultlist */ $ret.= "
".sprintf(_("%s results for your search with the keyword %s"), - "".count($topten)."", - "".session::get('parsed_search_keyword').""); + bold(count($topten)), + bold(session::get('parsed_search_keyword'))); $ret.="

"; return($ret); @@ -459,9 +458,7 @@ function createResultEntry($entry,$res,$name,$max) - - ".(sprintf(_("%s%% hit rate in file %s"),$percentage,$name))." - + ".(sprintf(_("%s%% hit rate in file %s"), bold($percentage), bold($name)))." @@ -495,7 +492,7 @@ function getheader_from_content($str) { $str = strip_tags($str); $pos = 0; - $arr = split("\n",$str); + $arr = preg_split("/\n/",$str); foreach($arr as $possibleheadline){ if(strlen($possibleheadline)>=3){ return $possibleheadline;