1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/13683] Fix more cases

PHPBB3-13683
This commit is contained in:
Tristan Darricau
2016-03-27 19:59:15 +02:00
parent 1a5fbd4bd0
commit 0b1ed8dbbb
2 changed files with 5 additions and 4 deletions

View File

@@ -143,12 +143,13 @@ class helper
$context = new RequestContext();
$context->fromRequest($this->symfony_request);
if ($this->config['force_server_vars']) {
if ($this->config['force_server_vars'])
{
$context->setHost($this->config['server_name']);
$context->setScheme(substr($this->config['server_protocol'], -4));
$context->setHttpPort($this->config['server_port']);
$context->setHttpsPort($this->config['server_port']);
$context->setBaseUrl($this->config['script_path'] . '/app.php');
$context->setBaseUrl($this->config['script_path']);
}
$script_name = $this->symfony_request->getScriptName();
@@ -166,7 +167,7 @@ class helper
$base_url = str_replace('/' . $page_name, empty($this->config['enable_mod_rewrite']) ? '/app.' . $this->php_ext : '', $base_url);
// We need to update the base url to move to the directory of the app.php file if the current script is not app.php
if ($page_name !== 'app.php')
if ($page_name !== 'app.php' && !$this->config['force_server_vars'])
{
if (empty($this->config['enable_mod_rewrite']))
{