removing useless block
This commit is contained in:
parent
ce7db0004b
commit
205022b4c8
@ -1717,7 +1717,9 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $donotupdatesess
|
|||||||
|
|
||||||
// Update index table of files (llx_ecm_files)
|
// Update index table of files (llx_ecm_files)
|
||||||
if ($donotupdatesession == 1) {
|
if ($donotupdatesession == 1) {
|
||||||
$result = addFileIntoDatabaseIndex($upload_dir, basename($destfile).($resupload == 2 ? '.noexe' : ''), $TFile['name'][$i], 'uploaded', 0, $object);
|
$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).($resupload == 2 ? '.noexe' : ''), $TFile['name'][$i], 'uploaded', $sharefile, $object);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
if ($allowoverwrite) {
|
if ($allowoverwrite) {
|
||||||
// Do not show error message. We can have an error due to DB_ERROR_RECORD_ALREADY_EXISTS
|
// Do not show error message. We can have an error due to DB_ERROR_RECORD_ALREADY_EXISTS
|
||||||
@ -1727,13 +1729,6 @@ 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