From f67f0df6099c976d87a7e1a15da0430309052936 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Feb 2018 12:11:39 +0100 Subject: [PATCH] Fix preview link not visible with long file names --- htdocs/core/class/html.formfile.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 74ea44c84e7..ebbdc22a097 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -716,13 +716,13 @@ class FormFile if (isset($conf->global->DOL_URL_ROOT_DOCUMENT_PHP)) $documenturl=$conf->global->DOL_URL_ROOT_DOCUMENT_PHP; // To use another wrapper // Show file name with link to download - $out.= ''; + $out.= ''; $out.= 'trans("File").': '.$file["name"]); - $out.= $file["name"]; + $out.= dol_trunc($file["name"], 150); $out.= ''."\n"; $out.= $this->showPreview($file,$modulepart,$relativepath,0,$param); $out.= ''; @@ -1087,7 +1087,7 @@ class FormFile print ''; // File name - print ''; + print ''; // Show file name with link to download //print "XX".$file['name']; //$file['name'] must be utf8 @@ -1110,7 +1110,7 @@ class FormFile } else { - print $file['name']; + print dol_trunc($file['name'], 200); print ''; } // Preview link