From f2dc6872029c4ea6df2791fa6eea1f58cb3287d3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Feb 2019 13:26:37 +0100 Subject: [PATCH] Update html.formfile.class.php --- htdocs/core/class/html.formfile.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 52336e3759e..7d18d7e3a5d 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -176,7 +176,13 @@ class FormFile if ($savingdocmask) { //add a global variable for disable the auto renaming on upload - if($conf->global->MAIN_DOC_UPLOAD_NOT_RENAME_BY_DEFAULT==1){$rename='';}else{$rename='checked';} + if (! empty($conf->global->MAIN_DOC_UPLOAD_NOT_RENAME_BY_DEFAULT)) + { + $rename=''; + } + else { + $rename='checked'; + } $out .= ''; if (! empty($options)) $out .= ''.$options.'';