Fix calcolo link pdf per anteprima e firma

This commit is contained in:
loviuz 2020-02-19 12:48:40 +01:00
parent b86567bae1
commit 6218a418f0
1 changed files with 1 additions and 3 deletions

View File

@ -248,9 +248,7 @@ class Prints
*/
public static function getPDFLink($path)
{
$base = (stripos($_SERVER['SERVER_PROTOCOL'], 'https') === 0 ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].'/'.ROOTDIR.'/';
return ROOTDIR.'/assets/dist/pdfjs/web/viewer.html?file='.$base.ltrim(str_replace(DOCROOT, '', $path), '/');
return ROOTDIR.'/assets/dist/pdfjs/web/viewer.html?file='.BASEURL.'/'.ltrim(str_replace(DOCROOT, '', $path), '/');
}
/**