From 7154ecb80bb799d206b2d96b501b443ced349f14 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 13:56:10 +0200 Subject: [PATCH] Fix reload of conf in cron script --- scripts/cron/cron_run_jobs.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index 0f20675cbfc..1bf31ebfd4b 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -174,9 +174,9 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) { echo "cron_run_jobs.php cronjobid: ".$line->id." priority=".$line->priority." entity=".$line->entity." label=".$line->label; // Force reload of setup for the current entity - if ($line->entity != $conf->entity) + if ((empty($line->entity)?1:$line->entity) != $conf->entity) { - dol_syslog("cron_run_jobs.php we work on another entity so we reload user and conf", LOG_DEBUG); + dol_syslog("cron_run_jobs.php we work on another entity conf than ".$conf->entity." so we reload user and conf", LOG_DEBUG); echo " -> we change entity so we reload user and conf"; $conf->entity = (empty($line->entity)?1:$line->entity);