';
-print ' ';
-sort($rights_ids);
-foreach($rights_ids as $right_id)
-{
- if ($old == $right_id)
- print "Attention doublon sur la permission : $right_id ";
- $old = $right_id;
-}
-
llxFooter('$Date$ - $Revision$');
?>
diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php
new file mode 100644
index 00000000000..1daddf96cfd
--- /dev/null
+++ b/htdocs/admin/system/modules.php
@@ -0,0 +1,121 @@
+
+ * Copyright (C) 2007 Rodolphe Quiedeville
+ *
+ * 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.
+ */
+
+/**
+ * \file htdocs/admin/system/dolibarr.php
+ * \brief Fichier page info systemes Dolibarr
+ * \version $Id$
+ */
+
+require("./pre.inc.php");
+
+$langs->load("admin");
+$langs->load("install");
+$langs->load("other");
+
+if (!$user->admin)
+ accessforbidden();
+
+
+/*
+ * View
+ */
+
+llxHeader();
+
+print_fiche_titre($langs->trans("AvailableModules"),'','setup');
+
+print " \n";
+print $langs->trans("ToActivateModule").' ';
+print " \n";
+
+// Charge les modules
+$db->begin();
+
+$dir = DOL_DOCUMENT_ROOT . "/includes/modules/";
+$handle=opendir($dir);
+$modules = array();
+$modules_names = array();
+$modules_files = array();
+while (($file = readdir($handle))!==false)
+{
+ if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, strlen($file) - 10) == '.class.php')
+ {
+ $modName = substr($file, 0, strlen($file) - 10);
+
+ if ($modName)
+ {
+ include_once(DOL_DOCUMENT_ROOT."/includes/modules/".$file);
+ $objMod = new $modName($db);
+
+ $modules[$objMod->numero]=$objMod;
+ $modules_names[$objMod->numero]=$objMod->name;
+ $modules_files[$objMod->numero]=$file;
+ $picto[$objMod->numero]=(isset($objMod->picto) && $objMod->picto)?$objMod->picto:'generic';
+ }
+ }
+}
+print '
';
+print ' ';
+sort($rights_ids);
+foreach($rights_ids as $right_id)
+{
+ if ($old == $right_id)
+ print "Attention doublon sur la permission : $right_id ";
+ $old = $right_id;
+}
+
+llxFooter('$Date$ - $Revision$');
+?>
diff --git a/htdocs/admin/system/pre.inc.php b/htdocs/admin/system/pre.inc.php
index 528266c4c48..6f987064d84 100644
--- a/htdocs/admin/system/pre.inc.php
+++ b/htdocs/admin/system/pre.inc.php
@@ -17,15 +17,13 @@
* 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.
- *
- * $Id$
*/
/**
- \file htdocs/admin/system/pre.inc.php
- \brief Fichier gestionnaire menu page infos système
- \version $Revision$
-*/
+ * \file htdocs/admin/system/pre.inc.php
+ * \brief Fichier gestionnaire menu page infos système
+ * \version $Id$
+ */
require("../../main.inc.php");
@@ -45,7 +43,8 @@ function llxHeader($head = "", $urlp = "")
// Dolibarr
$menu->add(DOL_URL_ROOT."/admin/system/dolibarr.php", "Dolibarr");
$menu->add_submenu(DOL_URL_ROOT."/admin/system/constall.php", $langs->trans("AllParameters"));
- $menu->add_submenu(DOL_URL_ROOT."/admin/triggers.php", $langs->trans("Triggers"));
+ $menu->add_submenu(DOL_URL_ROOT."/admin/system/modules.php", $langs->trans("Modules"));
+ $menu->add_submenu(DOL_URL_ROOT."/admin/triggers.php", $langs->trans("Triggers"));
$menu->add_submenu(DOL_URL_ROOT."/about.php", $langs->trans("About"));
// OS
@@ -56,9 +55,6 @@ function llxHeader($head = "", $urlp = "")
// PHP
$menu->add(DOL_URL_ROOT."/admin/system/phpinfo.php", $langs->trans("Php"));
- $menu->add_submenu(DOL_URL_ROOT."/admin/system/phpinfo.php?what=conf", $langs->trans("PhpConf"));
- $menu->add_submenu(DOL_URL_ROOT."/admin/system/phpinfo.php?what=env", $langs->trans("PhpEnv"));
- $menu->add_submenu(DOL_URL_ROOT."/admin/system/phpinfo.php?what=modules", $langs->trans("PhpModules"));
// Database
$menu->add(DOL_URL_ROOT."/admin/system/database.php", $langs->trans("Database"));
diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php
index 4375900debe..06a11724e25 100644
--- a/htdocs/admin/triggers.php
+++ b/htdocs/admin/triggers.php
@@ -14,15 +14,13 @@
* 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.
- *
- * $Id$
*/
/**
- \file htdocs/admin/triggers.php
- \brief Page de configuration et activation des triggers
- \version $Revision$
-*/
+ * \file htdocs/admin/triggers.php
+ * \brief Page de configuration et activation des triggers
+ * \version $Id$
+ */
require("./pre.inc.php");
include_once(DOL_DOCUMENT_ROOT ."/interfaces.class.php");
diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php
index 05c3ea4a61b..3da890bbc06 100644
--- a/htdocs/includes/menus/barre_left/eldy_backoffice.php
+++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php
@@ -131,6 +131,7 @@ class MenuLeft {
$newmenu->add(DOL_URL_ROOT."/admin/system/index.php?leftmenu=system", $langs->trans("SystemInfo"));
if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/admin/system/dolibarr.php", $langs->trans("Dolibarr"),1);
if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/admin/system/constall.php", $langs->trans("AllParameters"),2);
+ if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/admin/system/modules.php", $langs->trans("Modules"),2);
if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/admin/triggers.php", $langs->trans("Triggers"),2);
if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/about.php", $langs->trans("About"),2);
if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/admin/system/os.php", $langs->trans("OS"));
diff --git a/htdocs/includes/menus/barre_left/eldy_frontoffice.php b/htdocs/includes/menus/barre_left/eldy_frontoffice.php
index 757d2731f56..9145cc0a3b0 100644
--- a/htdocs/includes/menus/barre_left/eldy_frontoffice.php
+++ b/htdocs/includes/menus/barre_left/eldy_frontoffice.php
@@ -133,6 +133,7 @@ class MenuLeft {
$newmenu->add(DOL_URL_ROOT."/admin/system/index.php?leftmenu=system", $langs->trans("SystemInfo"));
if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/admin/system/dolibarr.php", $langs->trans("Dolibarr"),1);
if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/admin/system/constall.php", $langs->trans("AllParameters"),2);
+ if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/admin/system/modules.php", $langs->trans("Modules"),2);
if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/admin/triggers.php", $langs->trans("Triggers"),2);
if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/about.php", $langs->trans("About"),2);
if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/admin/system/os.php", $langs->trans("OS"));
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 5bc4cac3be0..2f1aa5d7abe 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -581,7 +581,11 @@ SystemInfoDesc=System information is miscellanous technical information you get
SystemAreaForAdminOnly=This area is available for administrator users only. None of the Dolibarr permissions can reduce this limit.
CompanyFundationDesc=Edit on this page all known information of the company or fundation you need to manage
DisplayDesc=You can choose each parameter related to the Dolibarr look and feel here
-TriggersAvailable=Triggers available
+AvailableModules=Available modules
+ToActivateModule=To activate modules, go on setup Area.
+SessionTimeOut=Time out for session
+SessionExplanation=This number guarantee that session will never expire before this delay. But PHP sessoin management does not guaranty that session always expire after this delay: This occurs if a system to clean cache session is running. Note: with no particular system, internal PHP process will clean session every about %s/%s access but only during access made by other sessions.
+TriggersAvailable=Available triggers
TriggersDesc=Triggers are files that will modify the behaviour of Dolibarr workflow once copied into the directory htdocs/includes/triggers. They realised new actions, activated on Dolibarr events (new company creation, invoice validation, ...).
TriggerDisabledByName=Triggers in this file are disabled by the -NORUN suffix in their name.
TriggerDisabledAsModuleDisabled=Triggers in this file are disabled as module %s is disabled.
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index a128e4d5b98..f018dc326e3 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -580,6 +580,10 @@ SystemInfoDesc=Les informations syst
SystemAreaForAdminOnly=Cet espace n'est accessible qu'aux utilisateurs de type administrateurs. Aucune permission Dolibarr ne permet d'étendre le cercle des utilisateurs autorisés à cet espace.
CompanyFundationDesc=Éditer sur cette page toutes les informations connues sur la société ou association que vous devez gérer
DisplayDesc=Vous pouvez choisir ici tous les paramètres liés à l'apparence de Dolibarr
+AvailableModules=Modules disponibles
+ToActivateModule=Pour activer des modules, aller dans l'espace Configuration.
+SessionTimeOut=Time out des sessions
+SessionExplanation=Ce nombre garantie que la session n'expire pas avant ce délai. Mais la gestion de session PHP ne garantie pas que la session expire après ce délai: Ce sera le cas si un systeme de nettoyage des caches sessions est en place. Note: Sans mécanisme special, le mécanisme interne à PHP nettoie la session tous les %s/%s accès environ mais uniquement lors d'accès fait par d'autres sessions.
TriggersAvailable=Triggers disponibles
TriggersDesc=Les triggers sont des fichiers qui, une fois déposés dans le répertoire htdocs/includes/triggers, modifient le comportement du workflow de Dolibarr. Ils réalisent des actions supplémentaires, déclenchées par les événements Dolibarr (création société, validation facture, clôture contrat...).
TriggerDisabledByName=Triggers de ce fichier désactivés par le suffix -NORUN dans le nom du fichier.
diff --git a/htdocs/lib/antispamimage.php b/htdocs/lib/antispamimage.php
index 1eeb3426adb..370f16e4ddc 100644
--- a/htdocs/lib/antispamimage.php
+++ b/htdocs/lib/antispamimage.php
@@ -37,6 +37,7 @@ require_once ARTICHOW."/AntiSpam.class.php";
// Init session
$sessionname="DOLSESSID_".$dolibarr_main_db_name;
+if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) ini_set('session.gc_maxlifetime',$conf->global->MAIN_SESSION_TIMEOUT);
session_name($sessionname);
session_start();
dolibarr_syslog("Session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"]);
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 4c3b70fd808..1ab647ed45f 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -139,10 +139,10 @@ if (! defined('NOREQUIREAJAX') && $conf->use_javascript_ajax) require_once(DOL_D
// Init session
$sessionname="DOLSESSID_".$dolibarr_main_db_name;
-//ini_set('session.gc_maxlifetime',10);
+if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) ini_set('session.gc_maxlifetime',$conf->global->MAIN_SESSION_TIMEOUT);
session_name($sessionname);
session_start();
-dolibarr_syslog("Session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"]);
+dolibarr_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"]);
/*
* Phase identification
diff --git a/htdocs/user/logout.php b/htdocs/user/logout.php
index 4078438b66f..08ed615a734 100644
--- a/htdocs/user/logout.php
+++ b/htdocs/user/logout.php
@@ -43,9 +43,14 @@ if ($conf->phenix->enabled && $conf->phenix->cookie)
dolibarr_syslog("End session in DOLSESSID_".$dolibarr_main_db_name);
session_destroy();
+
+// Init session
$sessionname="DOLSESSID_".$dolibarr_main_db_name;
+if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) ini_set('session.gc_maxlifetime',$conf->global->MAIN_SESSION_TIMEOUT);
session_name($sessionname);
session_start();
+dolibarr_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"]);
+
session_unregister("dol_login");
header("Location: ".DOL_URL_ROOT."/index.php");
diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php
index b372a26684d..94447f5d3f0 100644
--- a/htdocs/user/param_ihm.php
+++ b/htdocs/user/param_ihm.php
@@ -151,7 +151,7 @@ if ($_GET["action"] == 'edit')
$var=!$var;
print '