Merge pull request #20895 from ATM-Consulting/FIX_15.0_unable_to_add_several_cron_jobs_with_same_method_and_different_parameters

FIX 15.0: modules cannot declare more than 1 cron job using the same method with different parameters
This commit is contained in:
Laurent Destailleur 2022-05-21 01:17:28 +02:00 committed by GitHub
commit 980c9874ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1430,6 +1430,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
if ($command) {
$sql .= " AND command = '".$this->db->escape($command)."'";
}
if ($parameters) {
$sql .= " AND params = '".$this->db->escape($parameters)."'";
}
$sql .= " AND entity = ".((int) $entity); // Must be exact entity
$now = dol_now();