target _blank depend of mime
target _blank is added in the previous line depending on mimtype
This commit is contained in:
parent
ea5ffbb0bf
commit
84781cabac
@ -761,7 +761,7 @@ class FormFile
|
||||
$out.= '<a class="documentdownload paddingright" href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode($relativepath).($param?'&'.$param:'').'"';
|
||||
$mime=dol_mimetype($relativepath,'',0);
|
||||
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
|
||||
$out.= ' target="_blank">';
|
||||
$out.= '>';
|
||||
$out.= img_mime($file["name"],$langs->trans("File").': '.$file["name"]);
|
||||
$out.= dol_trunc($file["name"], 150);
|
||||
$out.= '</a>'."\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user