diff options
| author | 2015-07-23 10:05:32 +0200 | |
|---|---|---|
| committer | 2015-07-23 10:05:32 +0200 | |
| commit | 6db09411968ff0eac722efde79628b501b8dbe5e (patch) | |
| tree | 7edd704a6955d1fdd6c4a4c6b17aa3100702bffd /lib/Minz/Url.php | |
| parent | 2e544d2c1a38151bf63f3649cecf72026b52d0f0 (diff) | |
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
Diffstat (limited to 'lib/Minz/Url.php')
| -rw-r--r-- | lib/Minz/Url.php | 3 |
1 files changed, 3 insertions, 0 deletions
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; } |
