From 36d982682d9bfb5fa68fb4ecc9fcb5bbfacb82b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 19 Dec 2025 10:37:52 +0100 Subject: [PATCH] add more case to set share key --- htdocs/core/class/commonobject.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 3cc3ea76152..cccbb2f73c5 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6173,6 +6173,10 @@ abstract class CommonObject // Set the public "share" key $setsharekey = false; + if (!empty($this->TRIGGER_PREFIX) && (getDolGlobalInt($this->TRIGGER_PREFIX."_ALLOW_EXTERNAL_DOWNLOAD") || getDolGlobalInt($this->TRIGGER_PREFIX."_ALLOW_ONLINESIGN"))) { + $setsharekey = true; + } + // TODO Remove case covered by trigger prefix if ($this->element == 'propal' || $this->element == 'proposal') { if (getDolGlobalInt("PROPOSAL_ALLOW_ONLINESIGN")) { $setsharekey = true; // feature to make online signature is not set or set to on (default) @@ -6181,10 +6185,6 @@ abstract class CommonObject $setsharekey = true; } } - if (!empty($this->TRIGGER_PREFIX) && getDolGlobalInt($this->TRIGGER_PREFIX."_ALLOW_EXTERNAL_DOWNLOAD")) { - $setsharekey = true; - } - // TODO Remove case covered by trigger prefix if ($this->element == 'facture' && getDolGlobalInt("INVOICE_ALLOW_EXTERNAL_DOWNLOAD")) { $setsharekey = true; }