two changes to feature request
This commit is contained in:
parent
3749d70ae1
commit
ce7db0004b
@ -5516,6 +5516,9 @@ abstract class CommonObject
|
|||||||
if ($this->element == 'bank_account' && !empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) {
|
if ($this->element == 'bank_account' && !empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||||
$setsharekey = true;
|
$setsharekey = true;
|
||||||
}
|
}
|
||||||
|
if ($this->element == 'product' && !empty($conf->global->PRODUCT_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||||
|
$setsharekey = true;
|
||||||
|
}
|
||||||
if ($this->element == 'contrat' && !empty($conf->global->CONTRACT_ALLOW_EXTERNAL_DOWNLOAD)) {
|
if ($this->element == 'contrat' && !empty($conf->global->CONTRACT_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||||
$setsharekey = true;
|
$setsharekey = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1727,6 +1727,13 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $donotupdatesess
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update table of files
|
||||||
|
if ($donotupdatesession == 1) {
|
||||||
|
$sharefile = 0;
|
||||||
|
if ($TFile['type'][$i] == 'application/pdf' && strpos($_SERVER["REQUEST_URI"], 'product') !== false && !empty($conf->global->PRODUCT_ALLOW_EXTERNAL_DOWNLOAD)) $sharefile = 1;
|
||||||
|
$result = addFileIntoDatabaseIndex($upload_dir, basename($destfile), $TFile['name'][$i], 'uploaded', $sharefile);
|
||||||
|
}
|
||||||
|
|
||||||
$nbok++;
|
$nbok++;
|
||||||
} else {
|
} else {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user