From 5a8f4905d6eda2f95236fbb49b1eb68d977051ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 Nov 2013 20:36:07 +0100 Subject: [PATCH] Fix: bad link into ecm module --- htdocs/core/class/html.formfile.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index c467f7aaa84..97ecce50a15 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -770,15 +770,18 @@ class FormFile print ''; + print '&file='.urlencode($relativepath.$file['name']); + /* Restore old code: When file is at level 2+, full relative path must be in url, not only level1 if ($file['level1name'] <> $object->id) $filepath=urlencode($object->id.'/'.$file['level1name'].'/'.$file['name']); else $filepath=urlencode($object->id.'/'.$file['name']); - print '&file='.$filepath.'">'; + print '&file='.$filepath; + */ + print '">'; print img_mime($file['name'],$file['name'].' ('.dol_print_size($file['size'],0,0).')').' '; - if ($showrelpart == 1) print $file['level1name'].'/'; + if ($showrelpart == 1) print $relativepath; print dol_trunc($file['name'],$maxlength,'middle'); print ''; print "\n";