NEW Add option PROPOSAL/ORDER/INVOICE_ALLOW_EXTERNAL_DOWNLOAD
This commit is contained in:
parent
0d09e1d223
commit
76b0e7ee5a
@ -4091,7 +4091,12 @@ abstract class CommonObject
|
|||||||
$ecmfile=new EcmFiles($this->db);
|
$ecmfile=new EcmFiles($this->db);
|
||||||
$result = $ecmfile->fetch(0, '', ($rel_dir?$rel_dir.'/':'').$filename);
|
$result = $ecmfile->fetch(0, '', ($rel_dir?$rel_dir.'/':'').$filename);
|
||||||
|
|
||||||
if (! empty($conf->global->PROPOSAL_USE_ONLINE_SIGN))
|
// Set the public "share" key
|
||||||
|
$setsharekey = false;
|
||||||
|
if ($this->element == 'propal' && ! empty($conf->global->PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey=true;
|
||||||
|
if ($this->element == 'commande' && ! empty($conf->global->ORDER_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey=true;
|
||||||
|
if ($this->element == 'facture' && ! empty($conf->global->INVOICE_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey=true;
|
||||||
|
if ($setsharekey)
|
||||||
{
|
{
|
||||||
if (empty($ecmfile->share)) // Because object not found or share not set yet
|
if (empty($ecmfile->share)) // Because object not found or share not set yet
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user