X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Ffunctions_helpviewer.inc;h=8bb1dcdd6c4bf3cd4f9e2dee39090a98a3ceca6c;hb=7ce564d554053c9ff7ae13d00df50f5a1961357d;hp=ce7a7f45b485edf093939e5a2d4687ac4665b8f0;hpb=02bd61f90052ba951b0824e09456d9d9587274ec;p=gosa.git
diff --git a/gosa-core/include/functions_helpviewer.inc b/gosa-core/include/functions_helpviewer.inc
index ce7a7f45b..8bb1dcdd6 100644
--- a/gosa-core/include/functions_helpviewer.inc
+++ b/gosa-core/include/functions_helpviewer.inc
@@ -1,21 +1,23 @@
$attrs){
+ 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;
}
@@ -254,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);
}
@@ -281,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){
@@ -289,7 +292,7 @@ function search($arr,$word)
/* Filter words smaler than 3 chars */
if(strlen($tryword)>=$minwordlength) {
- $_SESSION['parsed_search_keyword'].=$tryword." ";
+ session::set('parsed_search_keyword', session::get('parsed_search_keyword').$tryword." ");
$useablewords[]=$tryword;
}
}
@@ -373,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];
@@ -384,7 +387,7 @@ function searchlist($arr,$res,$maxresults)
$ret.= "
".sprintf(_("%s results for your search with the keyword %s"),
"".count($topten)."",
- "".$_SESSION['parsed_search_keyword']."");
+ "".session::get('parsed_search_keyword')."");
$ret.="
";
return($ret);
@@ -491,7 +494,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;