Commit 10631112 authored by Dries's avatar Dries

- Patch #1572394 by attiks, Sweetchuck: Fixed Language detection by domain only works on port 80.

parent 002769ef
......@@ -223,7 +223,8 @@ function language_from_url($languages) {
// Get only the host, not the port.
$http_host= $_SERVER['HTTP_HOST'];
if (strpos($http_host, ':') !== FALSE) {
$http_host = current(explode(':', $http_host));
$http_host_tmp = explode(':', $http_host);
$http_host = current($http_host_tmp);
}
$domains = language_negotiation_url_domains();
foreach ($languages as $language) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment