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; }