diff --git a/class/actions_digiriskdolibarr.class.php b/class/actions_digiriskdolibarr.class.php index dae1adacd..d3d2f0c1c 100644 --- a/class/actions_digiriskdolibarr.class.php +++ b/class/actions_digiriskdolibarr.class.php @@ -1017,9 +1017,9 @@ public function saturneAdminDocumentData(array $parameters): int ]; // Do something only for the current context. - if (in_array($parameters['currentcontext'], ['digiriskdolibarradmindocuments'])) { + if (strpos($parameters['context'], 'digiriskdolibarradmindocuments')) { $this->results = $types; - } + } return 0; // or return 1 to replace standard code. } @@ -1040,7 +1040,7 @@ public function saturneAdminAdditionalConfig(array $parameters): int ]; // Do something only for the current context. - if (in_array($parameters['currentcontext'], ['digiriskdolibarradmindocuments'])) { + if (strpos($parameters['context'], 'digiriskdolibarradmindocuments')) { $this->results = $additionalConfig; }