diff --git a/htdocs/includes/triggers/interface_all_Demo.class.php-NORUN b/htdocs/includes/triggers/interface_all_Demo.class.php-NORUN index b1e71066fe3..11503186771 100644 --- a/htdocs/includes/triggers/interface_all_Demo.class.php-NORUN +++ b/htdocs/includes/triggers/interface_all_Demo.class.php-NORUN @@ -110,6 +110,8 @@ class InterfaceDemo } elseif ($action == 'USER_UPDATE_SESSION') { + // Warning: To increase performances, this action is triggered only if + // constant MAIN_ACTIVATE_UPDATESESSIONTRIGGER is set to 1. dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } elseif ($action == 'USER_CREATE') diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 4e724537556..b4f74722706 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -486,12 +486,15 @@ if (! defined('NOLOGIN')) } else { - // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); - $interface=new Interfaces($db); - $result=$interface->run_triggers('USER_UPDATE_SESSION',$user,$user,$langs,$conf,$conf->entity); - if ($result < 0) { $error++; } - // End call triggers + if (! empty($conf->MAIN_ACTIVATE_UPDATESESSIONTRIGGER)) + { + // Call triggers + include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + $interface=new Interfaces($db); + $result=$interface->run_triggers('USER_UPDATE_SESSION',$user,$user,$langs,$conf,$conf->entity); + if ($result < 0) { $error++; } + // End call triggers + } } } diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index e643c47a501..3f80fcb4424 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -362,6 +362,7 @@ if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC')) } else // For backward compatibility { + dol_syslog("Your country setup use an old syntax. Reedit it in setup area.", LOG_WARNING); include_once(DOL_DOCUMENT_ROOT.'/lib/company.lib.php'); $pays_code=getCountry($pays_id,2,$db); // This need a SQL request, but it's the old feature $pays_label=getCountry($pays_id,0,$db); // This need a SQL request, but it's the old feature