Add log if trigger not launched
Rename property ->workflow of a trigger by property ->disabled_if_workflow. This make code easier to understand.
This commit is contained in:
parent
d881cfafd7
commit
f43baaddf5
@ -107,14 +107,19 @@ class Interfaces
|
||||
continue;
|
||||
}
|
||||
|
||||
dol_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO);
|
||||
include_once($dir."/".$file);
|
||||
$objMod = new $modName($this->db);
|
||||
$i=0;
|
||||
if ($objMod)
|
||||
{
|
||||
// Bypass if workflow module is enabled and if the trigger is compatible
|
||||
if ($conf->workflow->enabled && $objMod->workflow) continue;
|
||||
// Bypass if workflow module is enabled and if the trigger asked to be disable in such case
|
||||
if ($conf->workflow->enabled && ! empty($objMod->disabled_if_workflow))
|
||||
{
|
||||
dol_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO);
|
||||
continue;
|
||||
}
|
||||
|
||||
dol_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO);
|
||||
|
||||
$modules[$i] = $modName;
|
||||
//dol_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO);
|
||||
@ -139,6 +144,10 @@ class Interfaces
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("Interfaces::run_triggers Failed to instantiate trigger for file '".$file."'",LOG_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user