From 6db09411968ff0eac722efde79628b501b8dbe5e Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Thu, 23 Jul 2015 10:05:32 +0200 Subject: Fix unexpected behaviour in getBaseUrl - getBaseUrl() returns info from configuration only and always append the suffix - add a guessBaseUrl() to extract base_url from $_SERVER info - fix Url::display() to take this change in consideration Fix https://github.com/FreshRSS/FreshRSS/issues/906 Use https://github.com/FreshRSS/FreshRSS/pull/910 --- lib/Minz/Url.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Minz/Url.php') diff --git a/lib/Minz/Url.php b/lib/Minz/Url.php index a2809257d..4279b045b 100644 --- a/lib/Minz/Url.php +++ b/lib/Minz/Url.php @@ -25,6 +25,9 @@ class Minz_Url { if ($absolute) { $url_string = Minz_Request::getBaseUrl(PUBLIC_TO_INDEX_PATH); + if ($url_string === PUBLIC_TO_INDEX_PATH) { + $url_string = Minz_Request::guessBaseUrl(); + } } else { $url_string = $isArray ? '.' : PUBLIC_RELATIVE; } -- cgit v1.2.3