Skip to content
Snippets Groups Projects
Commit c45aace9 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Add easy fix to solve pb of links for some modules.

parent 03ca7e6b
No related branches found
No related tags found
No related merge requests found
......@@ -554,9 +554,12 @@ class FormFile
$out.= "<tr ".$bc[$var].">";
$documenturl = DOL_URL_ROOT.'/document.php';
if (isset($conf->global->DOL_URL_ROOT_DOCUMENT_PHP)) $documenturl=$conf->global->DOL_URL_ROOT_DOCUMENT_PHP;
// Show file name with link to download
$out.= '<td class="nowrap">';
$out.= '<a data-ajax="false" href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).'"';
$out.= '<a data-ajax="false" href="'.$documenturl.'?modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).'"';
$mime=dol_mimetype($relativepath,'',0);
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
$out.= ' target="_blank">';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment