aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/Url.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-06-12 22:21:57 +0200
committerGravatar GitHub <noreply@github.com> 2016-06-12 22:21:57 +0200
commit7bc2ff45009a601550d77007c94ec23e2ced8f19 (patch)
tree8f175b55e291a152d2811d85f4a6d085f18f6849 /lib/Minz/Url.php
parent8dcc0fd65a36adedb12e5d54bafb39e7e553d38b (diff)
parent17de4363b5b0ab3f3ddc703ccf98332770040e17 (diff)
Merge pull request #1165 from FreshRSS/dev1.3.2-beta
Release 1.3.2-beta
Diffstat (limited to 'lib/Minz/Url.php')
-rw-r--r--lib/Minz/Url.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Minz/Url.php b/lib/Minz/Url.php
index 382437e9a..c7c67123e 100644
--- a/lib/Minz/Url.php
+++ b/lib/Minz/Url.php
@@ -24,11 +24,15 @@ class Minz_Url {
$url_string = '';
if ($absolute) {
- $url_string = Minz_Request::getBaseUrl(PUBLIC_TO_INDEX_PATH);
- if ($url_string === PUBLIC_TO_INDEX_PATH) {
+ $url_string = Minz_Request::getBaseUrl();
+ if ($url_string == '') {
$url_string = Minz_Request::guessBaseUrl();
- } else {
- $url_string .= '/';
+ }
+ if ($isArray) {
+ $url_string .= PUBLIC_TO_INDEX_PATH;
+ }
+ if ($absolute === 'root') {
+ $url_string = parse_url($url_string, PHP_URL_PATH);
}
} else {
$url_string = $isArray ? '.' : PUBLIC_RELATIVE;