Fix wrong base URL generation

Signed-off-by: Ogün Karakuş <kirk5bucuk@gmail.com>
This commit is contained in:
Ogün Karakuş 2016-01-23 18:02:00 +02:00
parent 0b30fdc13e
commit 8429c4a363
No known key found for this signature in database
GPG Key ID: E246ED392E4F0EF1
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ function get_current_base_url()
$url = is_secure_connection() ? 'https://' : 'http://';
$url .= $_SERVER['SERVER_NAME'];
$url .= $_SERVER['SERVER_PORT'] == 80 || $_SERVER['SERVER_PORT'] == 443 ? '' : ':'.$_SERVER['SERVER_PORT'];
$url .= dirname($_SERVER['PHP_SELF']) !== '/' ? dirname($_SERVER['PHP_SELF']).'/' : '/';
$url .= str_replace('\\', '/', dirname($_SERVER['PHP_SELF'])) !== '/' ? str_replace('\\', '/', dirname($_SERVER['PHP_SELF'])).'/' : '/';
return $url;
}