浏览代码

Fix reload of conf in cron script

Laurent Destailleur 6 年之前
父节点
当前提交
7154ecb80b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      scripts/cron/cron_run_jobs.php

+ 2 - 2
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);