mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/15172] Use symfony request component to get port
PHPBB3-15172
This commit is contained in:
parent
954af4f180
commit
3f9de5b1d4
1 changed files with 3 additions and 2 deletions
|
@ -1644,7 +1644,7 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false,
|
||||||
*/
|
*/
|
||||||
function generate_board_url($without_script_path = false)
|
function generate_board_url($without_script_path = false)
|
||||||
{
|
{
|
||||||
global $config, $user, $request;
|
global $config, $user, $request, $symfony_request;
|
||||||
|
|
||||||
$server_name = $user->host;
|
$server_name = $user->host;
|
||||||
|
|
||||||
|
@ -1661,7 +1661,8 @@ function generate_board_url($without_script_path = false)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$server_port = $request->server('SERVER_PORT', 0);
|
$server_port = $symfony_request->getPort();
|
||||||
|
|
||||||
$forwarded_proto = $request->server('HTTP_X_FORWARDED_PROTO');
|
$forwarded_proto = $request->server('HTTP_X_FORWARDED_PROTO');
|
||||||
|
|
||||||
if (!empty($forwarded_proto) && $forwarded_proto === 'https')
|
if (!empty($forwarded_proto) && $forwarded_proto === 'https')
|
||||||
|
|
Loading…
Add table
Reference in a new issue