diff options
| author | 2015-05-30 20:46:41 +0200 | |
|---|---|---|
| committer | 2015-05-30 20:46:41 +0200 | |
| commit | 185dba88c1da23f3fa4e787635e42fd81002b2cc (patch) | |
| tree | 8122644648450a7722b617a0d106bca4d1106d95 /lib/Minz/Url.php | |
| parent | ca58a265e6a702e42e25f5bf2393896b5517b0be (diff) | |
| parent | 00e00849815f35ab3e3a1da2cbfa515f4bace392 (diff) | |
Merge 1.1.1-dev into /beta
https://github.com/FreshRSS/FreshRSS/issues/845
Diffstat (limited to 'lib/Minz/Url.php')
| -rw-r--r-- | lib/Minz/Url.php | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/Minz/Url.php b/lib/Minz/Url.php index af555a277..879077d0f 100644 --- a/lib/Minz/Url.php +++ b/lib/Minz/Url.php @@ -10,7 +10,6 @@ class Minz_Url { * $url['c'] = controller * $url['a'] = action * $url['params'] = tableau des paramètres supplémentaires - * $url['protocol'] = protocole à utiliser (http par défaut) * ou comme une chaîne de caractère * @param $encodage pour indiquer comment encoder les & (& ou & pour html) * @return l'url formatée @@ -19,28 +18,21 @@ class Minz_Url { $isArray = is_array($url); if ($isArray) { - $url = self::checkUrl ($url); + $url = self::checkUrl($url); } $url_string = ''; if ($absolute) { - if ($isArray && isset ($url['protocol'])) { - $protocol = $url['protocol']; - } elseif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { - $protocol = 'https:'; - } else { - $protocol = 'http:'; - } - $url_string = $protocol . '//' . Minz_Request::getDomainName () . Minz_Request::getBaseUrl (); + $url_string = Minz_Request::getBaseUrl(PUBLIC_TO_INDEX_PATH); } else { $url_string = $isArray ? '.' : PUBLIC_RELATIVE; } if ($isArray) { - $url_string .= self::printUri ($url, $encodage); + $url_string .= self::printUri($url, $encodage); } else { - $url_string .= $url; + $url_string = Minz_Helper::htmlspecialchars_utf8($url_string . $url); } return $url_string; |
