Skip to content

Commit

Permalink
#3540 [Accident] fix: fk_user_victim backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-theo committed Nov 30, 2023
1 parent be9c91c commit d3c1082
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/modules/modDigiriskDolibarr.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1595,14 +1595,15 @@ public function init($options = '')

$langs->load("digiriskdolibarr@digiriskdolibarr");

if ($conf->global->DIGIRISKDOLIBARR_ACCIDENT_REMOVE_FK_USER_VICTIM == 0) {
if (empty($conf->global->DIGIRISKDOLIBARR_ACCIDENT_REMOVE_FK_USER_VICTIM)) {

require_once __DIR__ . '/../../class/accident.class.php';
require_once __DIR__ . '/../../../saturne/class/saturnesignature.class.php';

$accident = new Accident($this->db);
$accident = new Accident($this->db);
$signatory = new SaturneSignature($this->db);

$accidentList = $accident->fetchAll('','',0,0,['customsql' => 'fk_user_victim > 0']);
$accidentList = $accident->fetchAll('','',0,0, ['customsql' => 'fk_user_victim > 0']);

if (is_array($accidentList) && !empty($accidentList)) {
foreach($accidentList as $accidentSingle) {
Expand Down

0 comments on commit d3c1082

Please sign in to comment.