From d1716babeffefcea5dc580aea0258ff4aa257bf4 Mon Sep 17 00:00:00 2001 From: iouston <4319513+iouston@users.noreply.github.com> Date: Wed, 27 Feb 2019 11:17:33 +0100 Subject: [PATCH] disable the auto renaming on upload add a global variable for disable the auto renaming on upload file corresponds to the request of this post : https://www.dolibarr.fr/forum/12-howto--aide/55094-fichiers-joints-decocher-la-case-sauver-sous#107392 --- htdocs/core/class/html.formfile.class.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index c53a5562997..52336e3759e 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -72,7 +72,7 @@ class FormFile * @param string $options Add an option column * @param integer $useajax Use fileupload ajax (0=never, 1=if enabled, 2=always whatever is option). * Deprecated 2 should never be used and if 1 is used, option should no be enabled. - * @param string $savingdocmask Mask to use to define output filename. For example 'XXXXX-__YYYYMMDD__-__file__' + * @param string $dodocmask Mask to use to define output filename. For example 'XXXXX-__YYYYMMDD__-__file__' * @param integer $linkfiles 1=Also add form to link files, 0=Do not show form to link files * @param string $htmlname Name and id of HTML form ('formuserfile' by default, 'formuserfileecm' when used to upload a file in ECM) * @param string $accept Specifies the types of files accepted (This is not a security check but an user interface facility. eg '.pdf,image/*' or '.png,.jpg' or 'video/*') @@ -174,14 +174,17 @@ class FormFile $out .= ""; if ($savingdocmask) - { - $out .= '