From e9d03408cca348082688565c44dfdad890b09975 Mon Sep 17 00:00:00 2001 From: Sergey Chernyshev Date: Sun, 31 Jul 2011 12:48:22 -0400 Subject: [PATCH] Fixed pathing problems on non-windows systems, closes #50. --- global.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/global.php b/global.php index 0cb721b..878ef69 100644 --- a/global.php +++ b/global.php @@ -5,10 +5,11 @@ # function to generate URL from current showslow_root function getShowSlowBase() { global $showslow_root; + $showslow_root = str_replace(DIRECTORY_SEPARATOR, '/', $showslow_root); // Chopping of trailing slash which is not supposed to be there in Apache config // See: http://httpd.apache.org/docs/2.0/mod/core.html#documentroot - $docroot = $_SERVER['DOCUMENT_ROOT']; + $docroot = str_replace(DIRECTORY_SEPARATOR, '/', $_SERVER['DOCUMENT_ROOT']); if (substr($docroot, -1) == '/') { $docroot = substr($docroot, 0, -1); }