aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/routing
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2016-03-27 20:06:02 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2016-03-29 21:15:50 +0200
commita5f1ff85634eb8936afd109395fc1d305eaca61e (patch)
treeee0185939f8c630b2ef79b082356bfe9f83de102 /phpBB/phpbb/routing
parent4205450c9dd63533a7c8361a04bc1bddc9cfb8ee (diff)
downloadforums-a5f1ff85634eb8936afd109395fc1d305eaca61e.tar
forums-a5f1ff85634eb8936afd109395fc1d305eaca61e.tar.gz
forums-a5f1ff85634eb8936afd109395fc1d305eaca61e.tar.bz2
forums-a5f1ff85634eb8936afd109395fc1d305eaca61e.tar.xz
forums-a5f1ff85634eb8936afd109395fc1d305eaca61e.zip
[ticket/13683] Fix merge into 3.2.x
PHPBB3-13683
Diffstat (limited to 'phpBB/phpbb/routing')
-rw-r--r--phpBB/phpbb/routing/helper.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/phpBB/phpbb/routing/helper.php b/phpBB/phpbb/routing/helper.php
index f56974a354..011cc4bfef 100644
--- a/phpBB/phpbb/routing/helper.php
+++ b/phpBB/phpbb/routing/helper.php
@@ -104,6 +104,15 @@ class helper
$context = new RequestContext();
$context->fromRequest($this->symfony_request);
+ if ($this->config['force_server_vars'])
+ {
+ $context->setHost($this->config['server_name']);
+ $context->setScheme(substr($this->config['server_protocol'], 0, -3));
+ $context->setHttpPort($this->config['server_port']);
+ $context->setHttpsPort($this->config['server_port']);
+ $context->setBaseUrl($this->config['script_path']);
+ }
+
$script_name = $this->symfony_request->getScriptName();
$page_name = substr($script_name, -1, 1) == '/' ? '' : utf8_basename($script_name);
@@ -119,7 +128,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']))
{