mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-24 10:21:32 +01:00
FIX Link to files on bank account tab broken with multicompany
FIX Link to preview on thirdparty broken with multicompany
This commit is contained in:
@@ -5839,9 +5839,10 @@ function getImageFileNameForSize($file, $extName, $extImgTarget='')
|
||||
*
|
||||
* @param string $modulepart propal, facture, facture_fourn, ...
|
||||
* @param string $relativepath Relative path of docs
|
||||
* @param string $param More param on http links
|
||||
* @return string Output string with HTML
|
||||
*/
|
||||
function getAdvancedPreviewUrl($modulepart, $relativepath)
|
||||
function getAdvancedPreviewUrl($modulepart, $relativepath, $param='')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@@ -5852,7 +5853,7 @@ function getAdvancedPreviewUrl($modulepart, $relativepath)
|
||||
//$mime_preview[]='archive';
|
||||
$num_mime = array_search(dol_mimetype($relativepath, '', 1), $mime_preview);
|
||||
|
||||
if ($num_mime !== false) return 'javascript:document_preview(\''.dol_escape_js(DOL_URL_ROOT.'/document.php?modulepart='.$modulepart.'&attachment=0&file='.$relativepath).'\', \''.dol_mimetype($relativepath).'\', \''.dol_escape_js('Preview').'\')';
|
||||
if ($num_mime !== false) return 'javascript:document_preview(\''.dol_escape_js(DOL_URL_ROOT.'/document.php?modulepart='.$modulepart.'&attachment=0&file='.$relativepath.($param?'&'.$param:'')).'\', \''.dol_mimetype($relativepath).'\', \''.dol_escape_js('Preview').'\')';
|
||||
else return '';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user