index 8107ef4e659dd87c4c282ac370ed5f9beb35da8c..95d56caaaba07b2ec6a15b1f10842d6861e28b00 100644 (file)
<?php
/*
<?php
/*
- This code is part of GOsa (https://gosa.gonicus.de)
- Copyright (C) 2003 Cajus Pollmeier, Fabian Hickert
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* Include classes and configs */
*/
/* Include classes and configs */
$config= session::get('config');
/* Language setup */
$config= session::get('config');
/* Language setup */
-if ($config->data['MAIN']['LANG'] == ""){
+$lang= $config->get_cfg_value("lang");
+if ($lang == ""){
$lang= get_browser_language();
$lang= get_browser_language();
-} else {
- $lang= $config->data['MAIN']['LANG'];
}
$lang.=".UTF-8";
}
$lang.=".UTF-8";
@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $lang, "Setting language to");
$config= session::get('config');
@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 ...
$smarty->assign("title", "GOsa - "._("Help browser"));
/* HELP management starts here ...
}elseif(isset($_GET['plug'])){
/* This displays helpfiles depending on the current $_GET[plug] */
}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";
$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= "";
}
if(empty($helpobject['currentplug'])){
$helpdir= "";
}
if(preg_match("/\//",$_GET['pg'])){
$arr = split("\/",$_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{
$helpdir = $helpobject['currentplug'];
$helpobject['file']= $arr[1];
}else{
$helpobject['file'] = "index.html";
}
/* Create new helpdir (The path where the requested page is located)*/
$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'])){
/* If helpdir is empty, force index */
if(empty($helpobject['currentplug'])){
/* If there is no helpdir or file defined, display the index */
if(isset($_POST['search'])){
/* 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))));
/* read all available directories */
$index = readfiles($helpdir,$prefix,$suffix,false,false);
$smarty->assign("help_contents",((searchlist($index,search($index,$_POST['search_string']),10))));