From 6218a418f09930ad3b28be1260bb4025c75c11f6 Mon Sep 17 00:00:00 2001 From: loviuz Date: Wed, 19 Feb 2020 12:48:40 +0100 Subject: [PATCH] Fix calcolo link pdf per anteprima e firma --- src/Prints.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Prints.php b/src/Prints.php index 8c88a8499..ceb6f46c0 100755 --- a/src/Prints.php +++ b/src/Prints.php @@ -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), '/'); } /**