mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Perf: A little speed improvement
This commit is contained in:
parent
cc7758b60c
commit
abb31f26b5
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user