diff options
author | Marc Alexander <admin@m-a-styles.de> | 2015-02-11 13:03:22 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-02-11 13:03:22 +0100 |
commit | 25b54791f9cc64f3e861a169a8a70d69c0cc2131 (patch) | |
tree | 6bbc74f8b6c1240f176e70575eab17926cfedd0e /phpBB/phpbb/controller | |
parent | c6a371531bab7ba7f003c57d25b6b515718eb54f (diff) | |
download | forums-25b54791f9cc64f3e861a169a8a70d69c0cc2131.tar forums-25b54791f9cc64f3e861a169a8a70d69c0cc2131.tar.gz forums-25b54791f9cc64f3e861a169a8a70d69c0cc2131.tar.bz2 forums-25b54791f9cc64f3e861a169a8a70d69c0cc2131.tar.xz forums-25b54791f9cc64f3e861a169a8a70d69c0cc2131.zip |
[ticket/13493] Append page name to base url if it doesn't contain it
PHPBB3-13493
Diffstat (limited to 'phpBB/phpbb/controller')
-rw-r--r-- | phpBB/phpbb/controller/helper.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php index c6c470e91b..dc802751fb 100644 --- a/phpBB/phpbb/controller/helper.php +++ b/phpBB/phpbb/controller/helper.php @@ -142,6 +142,12 @@ class helper $base_url = $context->getBaseUrl(); + // Append page name if base URL does not contain it + if (!empty($page_name) && strpos($base_url, '/' . $page_name) === false) + { + $base_url .= '/' . $page_name; + } + // 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); |