diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-09-19 18:59:09 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-09-19 18:59:09 +0200 |
commit | 1d5338348166f66eb92f2ecfdfc87a54427f68b8 (patch) | |
tree | bc00d0e8aaef05925e229cb781b2475d3125f8f1 /phpBB/phpbb | |
parent | 5091600a16eeee4dbd4c40ca1f051a9774887100 (diff) | |
parent | 9bf58697dcc18881086d1bcc4565a6ae77b4dd17 (diff) | |
download | forums-1d5338348166f66eb92f2ecfdfc87a54427f68b8.tar forums-1d5338348166f66eb92f2ecfdfc87a54427f68b8.tar.gz forums-1d5338348166f66eb92f2ecfdfc87a54427f68b8.tar.bz2 forums-1d5338348166f66eb92f2ecfdfc87a54427f68b8.tar.xz forums-1d5338348166f66eb92f2ecfdfc87a54427f68b8.zip |
Merge pull request #2973 from marc1706/ticket/13073-develop
Ticket/13073 develop
* marc1706/ticket/13073-develop:
[ticket/13073] Remove _test suffix from common test class
[ticket/13073] Switch $input with $expected and add paths with letters
[ticket/13073] Use abstract class for controller helper route tests
[ticket/13073] Add path regex to get_preg_expression() and add unit tests
[ticket/13073] Use just one regex in helper route()
[ticket/13073] Properly place comments in helper
[ticket/13073] Use correct class names in test files
[ticket/13073] Rework route tests and add tests for more directory types
[ticket/13073] Test that routes from subfolders like /adm work
[ticket/13073] Add tests for routes from adm pages
[ticket/13073] Add phpbb root path with mod rewrite enabled for proper routes
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/controller/helper.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php index e2932086db..fc19b855c0 100644 --- a/phpBB/phpbb/controller/helper.php +++ b/phpBB/phpbb/controller/helper.php @@ -140,8 +140,15 @@ 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. - $base_url = str_replace('/app.' . $this->php_ext, '/' . $this->phpbb_root_path . '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'])) + { + $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); |