Add easy fix to solve pb of links for some modules.
This commit is contained in:
parent
03ca7e6b63
commit
c45aace9b9
@ -554,9 +554,12 @@ class FormFile
|
|||||||
|
|
||||||
$out.= "<tr ".$bc[$var].">";
|
$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
|
// Show file name with link to download
|
||||||
$out.= '<td class="nowrap">';
|
$out.= '<td class="nowrap">';
|
||||||
$out.= '<a data-ajax="false" href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepath).'"';
|
$out.= '<a data-ajax="false" href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode($relativepath).'"';
|
||||||
$mime=dol_mimetype($relativepath,'',0);
|
$mime=dol_mimetype($relativepath,'',0);
|
||||||
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
|
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
|
||||||
$out.= ' target="_blank">';
|
$out.= ' target="_blank">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user