diff --git a/gosa-core/include/functions_helpviewer.inc b/gosa-core/include/functions_helpviewer.inc
index df7fc436c0fb9d1ec231b14d7a2f0e8dc0392fbe..8bb1dcdd6c4bf3cd4f9e2dee39090a98a3ceca6c 100644 (file)
$useablewords =array(); // Temporary searchword handling
$tryword = ""; // Temporary searchword handling
$result['global']['maxhit'] = 0;
- session::global_un_set('lastresults');
- session::global_un_set('parsed_search_keyword');
- session::global_set('parsed_search_keyword',"");
+ session::un_set('lastresults');
+ session::un_set('parsed_search_keyword');
+ session::set('parsed_search_keyword',"");
error_reporting(E_ALL | E_STRICT);
/* 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){
/* Filter words smaler than 3 chars */
if(strlen($tryword)>=$minwordlength) {
- session::global_set('parsed_search_keyword', session::global_get('parsed_search_keyword').$tryword." ");
+ session::set('parsed_search_keyword', session::get('parsed_search_keyword').$tryword." ");
$useablewords[]=$tryword;
}
}
}
/* Save result in Session, so we can mark words later, or go back to search, without searching again*/
- session::global_set('lastresults',$result);
+ session::set('lastresults',$result);
return($result);
}
/* Foreach */
foreach($topten as $key => $hits) {
- $ks = split("\/",$key);
+ $ks = explode("/",$key);
$k1 = $ks[0];
$k2 = $ks[1];
$ret.= "<br>
".sprintf(_("%s results for your search with the keyword %s"),
"<b>".count($topten)."</b>",
- "<b>".session::global_get('parsed_search_keyword')."</b>");
+ "<b>".session::get('parsed_search_keyword')."</b>");
$ret.="<br>
<br>";
return($ret);
{
$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;