diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index f7dfaa323fcda76383a819958b01e9432830e8b1..ea3cdd86bbf8026b8a2bd7b8c8d304b55f526ab1 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -117,7 +117,7 @@ foreach ($eventstolog as $key => $arr) print '<td>'; $key='MAIN_AGENDA_ACTIONAUTO_'.$arr['id']; $value=$conf->global->$key; - print '<input type="checkbox" name="'.$key.'" value="1"'.($value?' checked="true"':'').'>'; + print '<input '.$bc[$var].' type="checkbox" name="'.$key.'" value="1"'.($value?' checked="true"':'').'>'; print '</td></tr>'."\n"; } } diff --git a/htdocs/admin/events.php b/htdocs/admin/events.php index b1521ceaca68f97186d53bcafd2d1b2896a3d871..15f1f6abdeb12019c9daf713a6aaea981c690f13 100644 --- a/htdocs/admin/events.php +++ b/htdocs/admin/events.php @@ -17,11 +17,11 @@ */ /** - \file htdocs/admin/events.php - \ingroup core - \brief Log event setup page - \version $Id$ -*/ + * \file htdocs/admin/events.php + * \ingroup core + * \brief Log event setup page + * \version $Id$ + */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); @@ -133,7 +133,7 @@ foreach ($eventstolog as $key => $arr) print '<td>'; $key='MAIN_LOGEVENTS_'.$arr['id']; $value=$conf->global->$key; - print '<input type="checkbox" name="'.$key.'" value="1"'.($value?' checked="true"':'').'>'; + print '<input '.$bc[$var].' type="checkbox" name="'.$key.'" value="1"'.($value?' checked="true"':'').'>'; print '</td></tr>'."\n"; } } diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 6a8e66c6cd6710edb0feeb169a10bd6cbee1a5b5..b4f5d9d77dfa9b08014de8e360c51d6e37e3efdb 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -17,11 +17,11 @@ */ /** - \file htdocs/admin/security_other.php - \ingroup core - \brief Page de configuration du module s�curit� autre - \version $Id$ -*/ + * \file htdocs/admin/security_other.php + * \ingroup core + * \brief Page de configuration du module s�curit� autre + * \version $Id$ + */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); @@ -62,6 +62,13 @@ else if ($_GET["action"] == 'disable_captcha') exit; } +if ($_GET["action"] == 'MAIN_SESSION_TIMEOUT') +{ + dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", $_POST["MAIN_SESSION_TIMEOUT"]); + Header("Location: security_other.php"); + exit; +} + if ($_GET["action"] == 'activate_avscan') { dolibarr_set_const($db, "MAIN_USE_AVSCAN", '1'); @@ -99,7 +106,7 @@ $form = new Form($db); print '<table width="100%" class="noborder">'; print '<tr class="liste_titre">'; -print '<td>'.$langs->trans("Parameter").'</td>'; +print '<td colspan="2">'.$langs->trans("Parameter").'</td>'; print '<td>'.$langs->trans("Value").'</td>'; print '<td> </td>'; print "</tr>\n"; @@ -107,7 +114,7 @@ print "</tr>\n"; print '<form action="'.$_SERVER["PHP_SELF"].'?action=set_main_upload_doc" method="POST">'; print '<tr '.$bc[$var].'>'; -print '<td>'.$langs->trans("MaxSizeForUploadedFiles").'.'; +print '<td colspan="2">'.$langs->trans("MaxSizeForUploadedFiles").'.'; $max=@ini_get('upload_max_filesize'); if ($max) print ' '.$langs->trans("MustBeLowerThanPHPLimit",$max*1024,$langs->trans("Kb")).'.'; else print ' '.$langs->trans("NoMaxSizeByPHPLimit").'.'; @@ -119,6 +126,22 @@ print '<td align="center">'; print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">'; print '</td>'; print '</tr></form>'; + +$var=!$var; +if (empty($conf->global->MAIN_SESSION_TIMEOUT)) $conf->global->MAIN_SESSION_TIMEOUT=ini_get("session.gc_maxlifetime"); +print '<form action="'.$_SERVER["PHP_SELF"].'?action=MAIN_SESSION_TIMEOUT" method="POST">'; +print '<tr '.$bc[$var].'>'; +print '<td>'.$langs->trans("SessionTimeOut").'</td><td align="right">'; +print $form->textwithhelp('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); +print '</td>'; +print '<td nowrap="1">'; +print '<input class="flat" name="MAIN_SESSION_TIMEOUT" type="text" size="6" value="'.$conf->global->MAIN_SESSION_TIMEOUT.'"> '.$langs->trans("seconds"); +print '</td>'; +print '<td align="center">'; +print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">'; +print '</td>'; +print '</tr></form>'; + print '</table>'; print '<br>'; diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 606f467ac9f25804b1ee7c2d665fd82cd90c8942..16ffaf0598f336990890a9539a59968643ce027e 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -36,6 +36,8 @@ if (!$user->admin) /* * View */ + +$form=new Form($db); llxHeader(); @@ -100,94 +102,24 @@ print '<br>'; $var=true; print '<table class="noborder" width="100%">'; -print '<tr class="liste_titre"><td>'.$langs->trans("Session").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n"; +print '<tr class="liste_titre"><td>'.$langs->trans("Session").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>'."\n"; $var=!$var; -print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("SessionId")."</td><td>".session_id()."</td></tr>\n"; -//$var=!$var; -//print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentSessionTimeOut")."</td><td>".ini_get('session.gc_maxlifetime').' '.$langs->trans("seconds")."</td></tr>\n"; +print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("SessionId").'</td><td colspan="2">'.session_id()."</td></tr>\n"; $var=!$var; -print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentTheme")."</td><td>".$conf->theme."</td></tr>\n"; +print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentSessionTimeOut").'</td><td>'.ini_get('session.gc_maxlifetime').' '.$langs->trans("seconds"); +print '</td><td align="right">'; +print $form->textwithhelp('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); +print "</td></tr>\n"; $var=!$var; -print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentTopMenuHandler")."</td><td>".$conf->top_menu."</td></tr>\n"; +print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentTheme").'</td><td colspan="2">'.$conf->theme."</td></tr>\n"; $var=!$var; -print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentLeftMenuHandler")."</td><td>".$conf->left_menu."</td></tr>\n"; +print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentTopMenuHandler").'</td><td colspan="2">'.$conf->top_menu."</td></tr>\n"; $var=!$var; -print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentUserLanguage")."</td><td>".$langs->getDefaultLang()."</td></tr>\n"; -print '</table>'; -print '<br>'; - - -// 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 '<table class="noborder" width="100%">'; -print '<tr class="liste_titre">'; -print '<td>'.$langs->trans("Modules").'</td>'; -print '<td>'.$langs->trans("Version").'</td>'; -print '<td align="center">'.$langs->trans("Id Module").'</td>'; -print '<td>'.$langs->trans("Id Permissions").'</td>'; -print '</tr>'; -$var=false; -$sortorder=$modules_names; -ksort($sortorder); -$rights_ids = array(); -foreach($sortorder as $numero=>$name) -{ - $idperms=""; - $var=!$var; - // Module - print "<tr $bc[$var]><td width=\"300\" nowrap=\"nowrap\">"; - $alt=$name.' - '.$modules_files[$numero]; - print img_object($alt,$picto[$numero]).' '.$modules[$numero]->getName(); - print "</td>"; - // Version - print '<td>'.$modules[$numero]->getVersion().'</td>'; - // Id - print '<td align="center">'.$numero.'</td>'; - // Permissions - if ($modules[$numero]->rights) - { - foreach($modules[$numero]->rights as $rights) - { - $idperms.=($idperms?", ":"").$rights[0]; - array_push($rights_ids, $rights[0]); - } - } - print '<td>'.($idperms?$idperms:" ").'</td>'; - print "</tr>\n"; -} +print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentLeftMenuHandler").'</td><td colspan="2">'.$conf->left_menu."</td></tr>\n"; +$var=!$var; +print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentUserLanguage").'</td><td colspan="2">'.$langs->getDefaultLang()."</td></tr>\n"; print '</table>'; print '<br>'; -sort($rights_ids); -foreach($rights_ids as $right_id) -{ - if ($old == $right_id) - print "Attention doublon sur la permission : $right_id<br>"; - $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 0000000000000000000000000000000000000000..1daddf96cfdb65813bce30235d05322ff7a96d7e --- /dev/null +++ b/htdocs/admin/system/modules.php @@ -0,0 +1,121 @@ +<?php +/* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * + * 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 "<br>\n"; +print $langs->trans("ToActivateModule").'<br>'; +print "<br>\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 '<table class="noborder" width="100%">'; +print '<tr class="liste_titre">'; +print '<td>'.$langs->trans("Modules").'</td>'; +print '<td>'.$langs->trans("Version").'</td>'; +print '<td align="center">'.$langs->trans("Id Module").'</td>'; +print '<td>'.$langs->trans("Id Permissions").'</td>'; +print '</tr>'; +$var=false; +$sortorder=$modules_names; +ksort($sortorder); +$rights_ids = array(); +foreach($sortorder as $numero=>$name) +{ + $idperms=""; + $var=!$var; + // Module + print "<tr $bc[$var]><td width=\"300\" nowrap=\"nowrap\">"; + $alt=$name.' - '.$modules_files[$numero]; + print img_object($alt,$picto[$numero]).' '.$modules[$numero]->getName(); + print "</td>"; + // Version + print '<td>'.$modules[$numero]->getVersion().'</td>'; + // Id + print '<td align="center">'.$numero.'</td>'; + // Permissions + if ($modules[$numero]->rights) + { + foreach($modules[$numero]->rights as $rights) + { + $idperms.=($idperms?", ":"").$rights[0]; + array_push($rights_ids, $rights[0]); + } + } + print '<td>'.($idperms?$idperms:" ").'</td>'; + print "</tr>\n"; +} +print '</table>'; +print '<br>'; +sort($rights_ids); +foreach($rights_ids as $right_id) +{ + if ($old == $right_id) + print "Attention doublon sur la permission : $right_id<br>"; + $old = $right_id; +} + +llxFooter('$Date$ - $Revision$'); +?> diff --git a/htdocs/admin/system/pre.inc.php b/htdocs/admin/system/pre.inc.php index 528266c4c48f001a9833c2317bdcb58cb0f0da07..6f987064d84b7966402b36d4359a801485956d04 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 4375900debe61c31b05678f32d87b5053a102b3b..06a11724e25d56a01f712a88ac54a22bfa8f3293 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 05c3ea4a61b30c22583c7dde8825725bcfb93b82..3da890bbc06d01d5e8902202fc196f754faa80b3 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 757d2731f564e127078964e8614be8b7653dae4d..9145cc0a3b069369102ecb7df478e79c2b811e31 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 5bc4cac3be088d68b80f8b531daa96b76639e78d..2f1aa5d7abe2362549ad093979960cbf0fbdbdea 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.<br>Note: with no particular system, internal PHP process will clean session every about <b>%s/%s</b> 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 <b>htdocs/includes/triggers</b>. They realised new actions, activated on Dolibarr events (new company creation, invoice validation, ...). TriggerDisabledByName=Triggers in this file are disabled by the <b>-NORUN</b> suffix in their name. TriggerDisabledAsModuleDisabled=Triggers in this file are disabled as module <b>%s</b> is disabled. diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index a128e4d5b98cd3766ea5b9b43aeb0b916667690e..f018dc326e33b08530aacec07d169a8673ead13d 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.<br>Note: Sans m�canisme special, le m�canisme interne � PHP nettoie la session tous les <b>%s/%s</b> 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 <b>htdocs/includes/triggers</b>, 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 <b>-NORUN</b> dans le nom du fichier. diff --git a/htdocs/lib/antispamimage.php b/htdocs/lib/antispamimage.php index 1eeb3426adb06d10f765b3a5c3282f2fced121af..370f16e4ddc7ea5e43b97c0d83f505795eca9f9b 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 4c3b70fd8089997d0b21422d762b8243d4dfbf72..1ab647ed45f39bed3962d23eddcd372baefba546 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 4078438b66f312076dcc7664b942384810b4ac19..08ed615a7341e8d31ccf444d55442ae8e4f214d4 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 b372a26684d0f545a56d69e4fe891989be18f1c3..94447f5d3f06df54026508e87bed908760cb79f4 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -151,7 +151,7 @@ if ($_GET["action"] == 'edit') $var=!$var; print '<tr '.$bc[$var].'><td>'.$langs->trans("Language").'</td>'; print '<td>'.($conf->global->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):$conf->global->MAIN_LANG_DEFAULT).'</td>'; - print '<td align="left" nowrap="nowrap" width="20%"><input name="check_MAIN_LANG_DEFAULT" type="checkbox" '.($fuser->conf->MAIN_LANG_DEFAULT?" checked":""); + print '<td align="left" nowrap="nowrap" width="20%"><input '.$bc[$var].' name="check_MAIN_LANG_DEFAULT" type="checkbox" '.($fuser->conf->MAIN_LANG_DEFAULT?" checked":""); print ! empty($conf->global->MAIN_DEMO)?' disabled="true"':''; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").'</td>'; print '<td>'; @@ -163,7 +163,7 @@ if ($_GET["action"] == 'edit') $var=!$var; print '<tr '.$bc[$var].'><td>'.$langs->trans("MaxSizeList").'</td>'; print '<td>'.$conf->global->MAIN_SIZE_LISTE_LIMIT.'</td>'; - print '<td align="left" nowrap="nowrap" width="20%"><input name="check_SIZE_LISTE_LIMIT" type="checkbox" '.($fuser->conf->MAIN_SIZE_LISTE_LIMIT?" checked":""); + print '<td align="left" nowrap="nowrap" width="20%"><input '.$bc[$var].' name="check_SIZE_LISTE_LIMIT" type="checkbox" '.($fuser->conf->MAIN_SIZE_LISTE_LIMIT?" checked":""); print ! empty($conf->global->MAIN_DEMO)?' disabled="true"':''; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").'</td>'; print '<td><input class="flat" name="main_size_liste_limit" size="4" value="' . $fuser->conf->SIZE_LISTE_LIMIT . '"></td></tr>'; @@ -194,13 +194,13 @@ else $var=!$var; print '<tr '.$bc[$var].'><td>'.$langs->trans("Language").'</td>'; print '<td>'.($conf->global->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):$conf->global->MAIN_LANG_DEFAULT).'</td>'; - print '<td align="left" nowrap="nowrap" width="20%"><input type="checkbox" disabled '.($fuser->conf->MAIN_LANG_DEFAULT?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>'; + print '<td align="left" nowrap="nowrap" width="20%"><input '.$bc[$var].' type="checkbox" disabled '.($fuser->conf->MAIN_LANG_DEFAULT?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>'; print '<td>'.($fuser->conf->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):$fuser->conf->MAIN_LANG_DEFAULT).'</td></tr>'; $var=!$var; print '<tr '.$bc[$var].'><td>'.$langs->trans("MaxSizeList").'</td>'; print '<td>'.$conf->global->MAIN_SIZE_LISTE_LIMIT.'</td>'; - print '<td align="left" nowrap="nowrap" width="20%"><input type="checkbox" disabled '.($fuser->conf->MAIN_SIZE_LISTE_LIMIT?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>'; + print '<td align="left" nowrap="nowrap" width="20%"><input '.$bc[$var].' type="checkbox" disabled '.($fuser->conf->MAIN_SIZE_LISTE_LIMIT?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>'; print '<td>' . $fuser->conf->MAIN_SIZE_LISTE_LIMIT . '</td></tr>'; print '</table><br>'; @@ -250,7 +250,7 @@ function show_theme($fuser,$edit=0) print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultSkin").'</td>'; print '<td>'.$conf->global->MAIN_THEME.'</td>'; - print '<td '.$bc[$var].' align="left" nowrap="nowrap" width="20%"><input name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($fuser->conf->MAIN_THEME?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>'; + print '<td '.$bc[$var].' align="left" nowrap="nowrap" width="20%"><input '.$bc[$var].' name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($fuser->conf->MAIN_THEME?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>'; print '<td '.$bc[$var].'> </td></tr>'; $var=!$var; diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 434162757ca691b1ea2642a693a34c7503310b63..2895e50b9fdcec3d2e5d5015101a2dc2fbebb740 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -32,9 +32,10 @@ require_once(DOL_DOCUMENT_ROOT."/lib/usergroups.lib.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"]); +dolibarr_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"]); $user->getrights('user');