From 659f24efa9be2059d21bbd73dffb39e6fa58c642 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 Aug 2021 20:10:47 +0200 Subject: [PATCH] Update files.lib.php --- htdocs/core/lib/files.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 7ee3dbee46f..4d2da5217b6 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1792,9 +1792,10 @@ function addFileIntoDatabaseIndex($dir, $file, $fullpathorig = '', $mode = 'uplo $ecmfile->src_object_type = $object->table_element; } - if (!empty($conf->global->MAIN_FORCE_SHARING_ON_ANY_UPLOADED_FILE) && $conf->global->MAIN_FORCE_SHARING_ON_ANY_UPLOADED_FILE=='1') { + if (!empty($conf->global->MAIN_FORCE_SHARING_ON_ANY_UPLOADED_FILE)) { $setsharekey = 1; } + if ($setsharekey) { require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; $ecmfile->share = getRandomPassword(true);