Skip to content

Commit

Permalink
dol_add_file_process : return nb of success in case of multiple added…
Browse files Browse the repository at this point in the history
… files (#32027)
  • Loading branch information
rycks authored Nov 21, 2024
1 parent 2832654 commit 6c2effa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/core/lib/files.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1898,7 +1898,7 @@ function dol_init_file_process($pathtoscan = '', $trackid = '')
* @param int<0,1> $generatethumbs 1=Generate also thumbs for uploaded image files
* @param ?Object $object Object used to set 'src_object_*' fields
* @param string $forceFullTestIndexation '1'=Force full text storage in database even if global option not set (consume a high level of data)
* @return int Return integer <=0 if KO, >0 if OK
* @return int Return integer <=0 if KO, nb of success if OK (>0)
* @see dol_remove_file_process()
*/
function dol_add_file_process($upload_dir, $allowoverwrite = 0, $updatesessionordb = 0, $varfiles = 'addedfile', $savingdocmask = '', $link = null, $trackid = '', $generatethumbs = 1, $object = null, $forceFullTestIndexation = '')
Expand Down Expand Up @@ -2041,7 +2041,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $updatesessionor
}
}
if ($nbok > 0) {
$res = 1;
$res = $nbok;
setEventMessages($langs->trans("FileTransferComplete"), null, 'mesgs');
}
} else {
Expand Down

0 comments on commit 6c2effa

Please sign in to comment.