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

This commit is contained in:
Laurent Destailleur 2014-06-05 23:30:20 +02:00
parent 03ca7e6b63
commit c45aace9b9

View File

@ -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">';