Fix: bad link into ecm module
This commit is contained in:
parent
7a714906a0
commit
5a8f4905d6
@ -770,15 +770,18 @@ class FormFile
|
|||||||
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?modulepart='.$modulepart;
|
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?modulepart='.$modulepart;
|
||||||
if ($forcedownload) print '&attachment=1';
|
if ($forcedownload) print '&attachment=1';
|
||||||
if (! empty($object->entity)) print '&entity='.$object->entity;
|
if (! empty($object->entity)) print '&entity='.$object->entity;
|
||||||
//print '&file='.urlencode($relativepath.$file['name']).'">';
|
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)
|
if ($file['level1name'] <> $object->id)
|
||||||
$filepath=urlencode($object->id.'/'.$file['level1name'].'/'.$file['name']);
|
$filepath=urlencode($object->id.'/'.$file['level1name'].'/'.$file['name']);
|
||||||
else
|
else
|
||||||
$filepath=urlencode($object->id.'/'.$file['name']);
|
$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).')').' ';
|
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 dol_trunc($file['name'],$maxlength,'middle');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user