Fix absolute paths when Roundcube is running at domain root
This commit is contained in:
parent
e56bd6be79
commit
980f3db55c
1 changed files with 2 additions and 2 deletions
|
@ -122,10 +122,10 @@ class pdfviewer extends rcube_plugin
|
|||
*/
|
||||
private function abs_url($relpath = '')
|
||||
{
|
||||
$webroot = '';
|
||||
$webroot = '/';
|
||||
|
||||
if (dirname($_SERVER['SCRIPT_NAME']) != '/')
|
||||
$webroot .= dirname($_SERVER['SCRIPT_NAME']) . '/';
|
||||
$webroot = dirname($_SERVER['SCRIPT_NAME']) . '/';
|
||||
|
||||
return $webroot . preg_replace('!^\./!', '', $relpath);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue