diff options
author | Rubén Calvo <rubencm@gmail.com> | 2017-09-09 17:09:51 +0200 |
---|---|---|
committer | Rubén Calvo <rubencm@gmail.com> | 2017-09-09 17:32:06 +0200 |
commit | 3f9de5b1d4000a45a7a5bc8ae9a74565ca3046e3 (patch) | |
tree | cdb9a50b2b6f69efa1f9268f57663aa1bcd2eb1a /phpBB | |
parent | 954af4f18009740bdf3f15b6a2518162e0638c05 (diff) | |
download | forums-3f9de5b1d4000a45a7a5bc8ae9a74565ca3046e3.tar forums-3f9de5b1d4000a45a7a5bc8ae9a74565ca3046e3.tar.gz forums-3f9de5b1d4000a45a7a5bc8ae9a74565ca3046e3.tar.bz2 forums-3f9de5b1d4000a45a7a5bc8ae9a74565ca3046e3.tar.xz forums-3f9de5b1d4000a45a7a5bc8ae9a74565ca3046e3.zip |
[ticket/15172] Use symfony request component to get port
PHPBB3-15172
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/functions.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 6a36210dca..5178c1636b 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1644,7 +1644,7 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false, */ function generate_board_url($without_script_path = false) { - global $config, $user, $request; + global $config, $user, $request, $symfony_request; $server_name = $user->host; @@ -1661,7 +1661,8 @@ function generate_board_url($without_script_path = false) } else { - $server_port = $request->server('SERVER_PORT', 0); + $server_port = $symfony_request->getPort(); + $forwarded_proto = $request->server('HTTP_X_FORWARDED_PROTO'); if (!empty($forwarded_proto) && $forwarded_proto === 'https') |