summaryrefslogtreecommitdiff
path: root/plugins/pdfviewer
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-03-07 10:19:42 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-03-07 10:22:20 (GMT)
commit980f3db55c8d61c17e231fa4c9fbd838ea66c809 (patch)
treec7ded240f23f0247865d20152db3152070c21b91 /plugins/pdfviewer
parente56bd6be79909c5fde238164bb59e06c57dc083b (diff)
downloadroundcubemail-plugins-kolab-980f3db55c8d61c17e231fa4c9fbd838ea66c809.tar.gz
Fix absolute paths when Roundcube is running at domain root
Diffstat (limited to 'plugins/pdfviewer')
-rw-r--r--plugins/pdfviewer/pdfviewer.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/pdfviewer/pdfviewer.php b/plugins/pdfviewer/pdfviewer.php
index d9924b8..0b771ea 100644
--- a/plugins/pdfviewer/pdfviewer.php
+++ b/plugins/pdfviewer/pdfviewer.php
@@ -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);
}