diff --git a/gosa-core/include/functions_helpviewer.inc b/gosa-core/include/functions_helpviewer.inc
index 0be6301638731a2c7fb7c8d187e8d17abbcaa2a6..437ffe12e1a649bd63bccc83c458e343497d65be 100644 (file)
$xmldata= fread($fh, 100000);
fclose($fh);
if(!xml_parse($this->parser, chop($xmldata))){
$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);
exit;
}
return($this->entries);
{
global $helpobject;
$str = "";
{
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);
$exists = true;
$current_hl = "";
foreach($helpobject['helpconf'] as $id => $attrs){
$path = $test -> get_path($id);
$exists = true;
- $helpdir = "../doc/guide/user/".$helpobject['lang']."/html/".preg_replace("/^.*\//i","",$path)."/";
+ $helpdir = "../doc/core/".$helpobject['lang']."/html/".preg_replace("/^.*\//i","",$path)."/";
if(!is_dir($helpdir)){
$exists = false;
}
if(!is_dir($helpdir)){
$exists = false;
}
function linkwrapper($str,$link)
{
$str = preg_replace("/HREF=\"http/i","target=\"_blank\" href=\"http",$str);
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);
}
return($str);
}
/* Filter all unusable chars */
$word = preg_replace($allowed_chars_in_searchword,"",$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){
/* Check all wordlengths */
foreach($words as $tryword){
/* Foreach */
foreach($topten as $key => $hits) {
/* Foreach */
foreach($topten as $key => $hits) {
- $ks = split("\/",$key);
+ $ks = explode("/",$key);
$k1 = $ks[0];
$k2 = $ks[1];
$k1 = $ks[0];
$k2 = $ks[1];
/* appending footer message for resultlist */
$ret.= "<br>
".sprintf(_("%s results for your search with the keyword %s"),
/* appending footer message for resultlist */
$ret.= "<br>
".sprintf(_("%s results for your search with the keyword %s"),
- "<b>".count($topten)."</b>",
- "<b>".session::get('parsed_search_keyword')."</b>");
+ bold(count($topten)),
+ bold(session::get('parsed_search_keyword')));
$ret.="<br>
<br>";
return($ret);
$ret.="<br>
<br>";
return($ret);
</tr>
<tr>
<td colspan=2>
</tr>
<tr>
<td colspan=2>
- <b>
- ".(sprintf(_("%s%% hit rate in file %s"),$percentage,$name))."
- </b>
+ ".(sprintf(_("%s%% hit rate in file %s"), bold($percentage), bold($name)))."
</td>
</tr>
</table>
</td>
</tr>
</table>
{
$str = strip_tags($str);
$pos = 0;
{
$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;
foreach($arr as $possibleheadline){
if(strlen($possibleheadline)>=3){
return $possibleheadline;