Merge branch 'baseUrl' of https://github.com/Alkarex/FreshRSS into 906-fix-getBaseUrl

This commit is contained in:
Marien Fressinaud committed 2015-07-23 09:37:29 +02:00
commit 2e544d2c1a
1 file changed
+4 -1
+4 -1
View File
@@ -100,7 +100,10 @@ class Minz_Request {
} else {
$url .= '://' . $host . ($port == 80 ? '' : ':' . $port);
}
$url .= isset($_SERVER['REQUEST_URI']) ? dirname($_SERVER['REQUEST_URI']) : '';
if (isset($_SERVER['REQUEST_URI'])) {
$path = $_SERVER['REQUEST_URI'];
$url .= substr($path, -1) === '/' ? substr($path, 0, -1) : dirname($path);
}
} else {
$url = rtrim($url, '/\\') . $baseUrlSuffix;
}