aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2015-04-06 16:54:35 +0200
committerJoas Schilling <nickvergessen@gmx.de>2015-04-06 16:54:35 +0200
commit53ed8a3cd9d6c835132f0e33d6d360bb493e0e0a (patch)
tree9d311ca0884596cc4d09691292127f94b206ab9d /phpBB
parent02202b15030b93d2a5954c7fee7e4b05e4f02e80 (diff)
parent25b54791f9cc64f3e861a169a8a70d69c0cc2131 (diff)
downloadforums-53ed8a3cd9d6c835132f0e33d6d360bb493e0e0a.tar
forums-53ed8a3cd9d6c835132f0e33d6d360bb493e0e0a.tar.gz
forums-53ed8a3cd9d6c835132f0e33d6d360bb493e0e0a.tar.bz2
forums-53ed8a3cd9d6c835132f0e33d6d360bb493e0e0a.tar.xz
forums-53ed8a3cd9d6c835132f0e33d6d360bb493e0e0a.zip
Merge pull request #3392 from marc1706/ticket/13493
[ticket/13493] Append page name to base url if it doesn't contain it
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/phpbb/controller/helper.php6
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);