diff options
author | Marc Alexander <admin@m-a-styles.de> | 2013-12-28 00:14:12 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2013-12-28 00:14:12 +0100 |
commit | 4c1569dd8ab6d85aecd0bd30913512542d1f123d (patch) | |
tree | 2d417083f58a5813e8a284885251663cfa6d8c7c /phpBB/includes | |
parent | ce2c5213d7aad2c24ee83147b167236ce754c671 (diff) | |
download | forums-4c1569dd8ab6d85aecd0bd30913512542d1f123d.tar forums-4c1569dd8ab6d85aecd0bd30913512542d1f123d.tar.gz forums-4c1569dd8ab6d85aecd0bd30913512542d1f123d.tar.bz2 forums-4c1569dd8ab6d85aecd0bd30913512542d1f123d.tar.xz forums-4c1569dd8ab6d85aecd0bd30913512542d1f123d.zip |
[ticket/11997] Add user's page dir to redirect path and fix unit tests for it
The user's page directory needs to be added to the redirect URL for proper
redirects outside of the forum root. Fix the unit tests accordingly.
PHPBB3-11997
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index bd6a45685d..cc8478ace1 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2708,7 +2708,14 @@ function redirect($url, $return = false, $disable_cd_check = false) } } - $url = generate_board_url() . '/' . $phpbb_path_helper->remove_web_root_path($url); + $url = $phpbb_path_helper->remove_web_root_path($url); + + if ($user->page['page_dir']) + { + $url = $user->page['page_dir'] . '/' . $url; + } + + $url = generate_board_url() . '/' . $url; } // Clean URL and check if we go outside the forum directory |