X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Fhtml%2Fhelpviewer.php;h=95d56caaaba07b2ec6a15b1f10842d6861e28b00;hb=630626c6abe0a2d649dd03221ac43dd4ed53b0c0;hp=8107ef4e659dd87c4c282ac370ed5f9beb35da8c;hpb=e0abbe36fccaea7e7289a383cd04051222e3b892;p=gosa.git diff --git a/gosa-core/html/helpviewer.php b/gosa-core/html/helpviewer.php index 8107ef4e6..95d56caaa 100644 --- a/gosa-core/html/helpviewer.php +++ b/gosa-core/html/helpviewer.php @@ -1,21 +1,23 @@ data['MAIN']['LANG'] == ""){ +$lang= $config->get_cfg_value("lang"); +if ($lang == ""){ $lang= get_browser_language(); -} else { - $lang= $config->data['MAIN']['LANG']; } $lang.=".UTF-8"; @@ -60,11 +61,7 @@ textdomain($domain); @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $lang, "Setting language to"); $config= session::get('config'); -if (isset ($config->data['MAIN']['COMPILE'])){ - $smarty->compile_dir= $config->data['MAIN']['COMPILE']; -} else { - $smarty->compile_dir= '/var/spool/gosa/'; -} +$smarty->compile_dir= $config->get_cfg_value("compile", "/var/spool/gosa/"); $smarty->assign("title", "GOsa - "._("Help browser")); /* HELP management starts here ... @@ -140,11 +137,12 @@ if(session::is_set('current_class_for_help')){ }elseif(isset($_GET['plug'])){ /* This displays helpfiles depending on the current $_GET[plug] */ - $tmp = new pluglist(session::get('config'),get_userinfo()); + $ui= get_userinfo(); + $tmp = new pluglist(session::get('config'), $ui); $path = $tmp->get_path($_GET['plug']); $helpobject['currentplug'] = $path; $helpobject['file'] = "index.html"; - $helpdir = "../doc/guide/user/".$helpobject['lang']."/html/".preg_replace("/^.*\//i","",$helpobject['currentplug']); + $helpdir = "../doc/core/".$helpobject['lang']."/html/".preg_replace("/^.*\//i","",$helpobject['currentplug']); if(empty($helpobject['currentplug'])){ $helpdir= ""; } @@ -154,7 +152,7 @@ if(isset($_GET['pg'])){ if(preg_match("/\//",$_GET['pg'])){ $arr = split("\/",$_GET['pg']); - $helpobject['currentplug'] = "../doc/guide/user/".$helpobject['lang']."/html/".$arr[0]; + $helpobject['currentplug'] = "../doc/core/".$helpobject['lang']."/html/".$arr[0]; $helpdir = $helpobject['currentplug']; $helpobject['file']= $arr[1]; }else{ @@ -168,7 +166,7 @@ if(isset($_GET['pg'])){ $helpobject['file'] = "index.html"; } /* Create new helpdir (The path where the requested page is located)*/ - $helpdir = "../doc/guide/user/".$helpobject['lang']."/html/".preg_replace("/^.*\//i","",$helpobject['currentplug']); + $helpdir = "../doc/core/".$helpobject['lang']."/html/".preg_replace("/^.*\//i","",$helpobject['currentplug']); /* If helpdir is empty, force index */ if(empty($helpobject['currentplug'])){ @@ -223,7 +221,7 @@ if($helpobject['file'] == "index.html"){ /* If there is no helpdir or file defined, display the index */ if(isset($_POST['search'])){ - $helpdir = "../doc/guide/user/".$helpobject['lang']."/html/"; + $helpdir = "../doc/core/".$helpobject['lang']."/html/"; /* read all available directories */ $index = readfiles($helpdir,$prefix,$suffix,false,false); $smarty->assign("help_contents",((searchlist($index,search($index,$_POST['search_string']),10))));