mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-08 18:48:22 +01:00
Merge pull request #16351 from aspangaro/14a16
NEW: Add option CONTRACT_ALLOW_EXTERNAL_DOWNLOAD
This commit is contained in:
@@ -6558,6 +6558,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
if (is_object($object) && $object->element == 'commande') $typeforonlinepayment = 'order';
|
||||
if (is_object($object) && $object->element == 'facture') $typeforonlinepayment = 'invoice';
|
||||
if (is_object($object) && $object->element == 'member') $typeforonlinepayment = 'member';
|
||||
if (is_object($object) && $object->element == 'contrat') $typeforonlinepayment = 'contract';
|
||||
$url = getOnlinePaymentUrl(0, $typeforonlinepayment, $substitutionarray['__REF__']);
|
||||
$paymenturl = $url;
|
||||
}
|
||||
@@ -6579,10 +6580,15 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
{
|
||||
$substitutionarray['__DIRECTDOWNLOAD_URL_INVOICE__'] = $object->getLastMainDocLink($object->element);
|
||||
} else $substitutionarray['__DIRECTDOWNLOAD_URL_INVOICE__'] = '';
|
||||
if (!empty($conf->global->CONTRACT_ALLOW_EXTERNAL_DOWNLOAD) && is_object($object) && $object->element == 'contrat')
|
||||
{
|
||||
$substitutionarray['__DIRECTDOWNLOAD_URL_CONTRACT__'] = $object->getLastMainDocLink($object->element);
|
||||
} else $substitutionarray['__DIRECTDOWNLOAD_URL_CONTRACT__'] = '';
|
||||
|
||||
if (is_object($object) && $object->element == 'propal') $substitutionarray['__URL_PROPOSAL__'] = DOL_MAIN_URL_ROOT."/comm/propal/card.php?id=".$object->id;
|
||||
if (is_object($object) && $object->element == 'commande') $substitutionarray['__URL_ORDER__'] = DOL_MAIN_URL_ROOT."/commande/card.php?id=".$object->id;
|
||||
if (is_object($object) && $object->element == 'facture') $substitutionarray['__URL_INVOICE__'] = DOL_MAIN_URL_ROOT."/compta/facture/card.php?id=".$object->id;
|
||||
if (is_object($object) && $object->element == 'contrat') $substitutionarray['__URL_CONTRACT__'] = DOL_MAIN_URL_ROOT."/contrat/card.php?id=".$object->id;
|
||||
}
|
||||
|
||||
if (is_object($object) && $object->element == 'action')
|
||||
|
||||
Reference in New Issue
Block a user