Merge pull request #17388 from aspangaro/14a30
NEW: Add option SUPPLIER_PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD
This commit is contained in:
commit
062dc28850
@ -5238,6 +5238,9 @@ abstract class CommonObject
|
||||
if ($this->element == 'contrat' && !empty($conf->global->CONTRACT_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||
$setsharekey = true;
|
||||
}
|
||||
if ($this->element == 'supplier_proposal' && !empty($conf->global->SUPPLIER_PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||
$setsharekey = true;
|
||||
}
|
||||
|
||||
if ($setsharekey) {
|
||||
if (empty($ecmfile->share)) { // Because object not found or share not set yet
|
||||
|
||||
@ -7102,6 +7102,11 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
} else {
|
||||
$substitutionarray['__DIRECTDOWNLOAD_URL_CONTRACT__'] = '';
|
||||
}
|
||||
if (!empty($conf->global->SUPPLIER_PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD) && is_object($object) && $object->element == 'supplier_proposal') {
|
||||
$substitutionarray['__DIRECTDOWNLOAD_URL_SUPPLIER_PROPOSAL__'] = $object->getLastMainDocLink($object->element);
|
||||
} else {
|
||||
$substitutionarray['__DIRECTDOWNLOAD_URL_SUPPLIER_PROPOSAL__'] = '';
|
||||
}
|
||||
|
||||
if (is_object($object) && $object->element == 'propal') {
|
||||
$substitutionarray['__URL_PROPOSAL__'] = DOL_MAIN_URL_ROOT."/comm/propal/card.php?id=".$object->id;
|
||||
@ -7115,6 +7120,9 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
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 == 'supplier_proposal') {
|
||||
$substitutionarray['__URL_SUPPLIER_PROPOSAL__'] = DOL_MAIN_URL_ROOT."/supplier_proposal/card.php?id=".$object->id;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_object($object) && $object->element == 'action') {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user