Merge pull request #7810 from frederic34/patch-1

fix trigger when module not enabled
This commit is contained in:
Laurent Destailleur 2017-11-17 12:59:59 +01:00 committed by GitHub
commit 481b810fd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -97,7 +97,7 @@ class InterfaceMyModuleTriggers extends DolibarrTriggers
*/ */
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf) public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
{ {
if (!empty($conf->mymodule->enabled)) return 0; // Module not active, we do nothing if (empty($conf->mymodule->enabled)) return 0; // Module not active, we do nothing
// Put here code you want to execute when a Dolibarr business events occurs. // Put here code you want to execute when a Dolibarr business events occurs.
// Data and type of action are stored into $object and $action // Data and type of action are stored into $object and $action