mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-05 16:42:53 +01:00
Cleaner code to avoid to log when nothing is done
This commit is contained in:
@@ -63,11 +63,13 @@ class InterfaceNotification extends DolibarrTriggers
|
||||
{
|
||||
if (empty($conf->notification->enabled)) return 0; // Module not active, we do nothing
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
|
||||
$notify = new Notify($this->db);
|
||||
|
||||
if (! in_array($notifcode, $notify->arrayofnotifsupported)) return 0;
|
||||
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
|
||||
|
||||
$notify = new Notify($this->db);
|
||||
$notify->send($action, $object);
|
||||
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user