diff options
author | Nils Adermann <naderman@naderman.de> | 2014-09-29 16:17:25 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2014-09-29 16:17:25 +0200 |
commit | 8de97b8dbe8f4c30c208a9438f621016f4ed1599 (patch) | |
tree | ebd2cfe052f42d2275da98a849b871cf7bb463ca /phpBB/phpbb/controller/helper.php | |
parent | 573c2af33681ca104666eda87eaab5d7acb1a8fe (diff) | |
parent | 6f093ade8a025039c04e88c473e619153656c6a7 (diff) | |
download | forums-8de97b8dbe8f4c30c208a9438f621016f4ed1599.tar forums-8de97b8dbe8f4c30c208a9438f621016f4ed1599.tar.gz forums-8de97b8dbe8f4c30c208a9438f621016f4ed1599.tar.bz2 forums-8de97b8dbe8f4c30c208a9438f621016f4ed1599.tar.xz forums-8de97b8dbe8f4c30c208a9438f621016f4ed1599.zip |
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus:
[ticket/13113] Updates the base url only when the front-end isn't app.php
Diffstat (limited to 'phpBB/phpbb/controller/helper.php')
-rw-r--r-- | phpBB/phpbb/controller/helper.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php index fc19b855c0..187e455d48 100644 --- a/phpBB/phpbb/controller/helper.php +++ b/phpBB/phpbb/controller/helper.php @@ -140,14 +140,17 @@ class helper // If enable_mod_rewrite is false we need to replace the current front-end by app.php, otherwise we need to remove it. $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 (empty($this->config['enable_mod_rewrite'])) + // 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') { - $base_url = str_replace('/app.' . $this->php_ext, '/' . $this->phpbb_root_path . 'app.' . $this->php_ext, $base_url); - } - else - { - $base_url .= preg_replace(get_preg_expression('path_remove_dot_trailing_slash'), '$2', $this->phpbb_root_path); + if (empty($this->config['enable_mod_rewrite'])) + { + $base_url = str_replace('/app.' . $this->php_ext, '/' . $this->phpbb_root_path . 'app.' . $this->php_ext, $base_url); + } + else + { + $base_url .= preg_replace(get_preg_expression('path_remove_dot_trailing_slash'), '$2', $this->phpbb_root_path); + } } $base_url = $this->filesystem->clean_path($base_url); |