1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-23 05:54:03 +01:00

Fix calcolo link di anteprima pdf

This commit is contained in:
loviuz 2020-02-12 18:03:21 +01:00
parent 8fb27c4dd3
commit af58f029c4

View File

@ -250,7 +250,7 @@ class Prints
{
//http://localhost/openstamanager/
$folders = explode('/', dirname($_SERVER['PHP_SELF']));
$base = (stripos($_SERVER['SERVER_PROTOCOL'], 'https') === 0 ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].'/'.$folders[1].'/';
$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), '/');
}