1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-04 07:47:34 +02:00

some updates; and hopefully not completely breaking redirects (again). :D You know, i like breaking things.

git-svn-id: file:///svn/phpbb/trunk@6544 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-11-02 15:23:33 +00:00
parent 21a002e4ac
commit a3bf1ed63e
9 changed files with 79 additions and 24 deletions

View File

@@ -1464,7 +1464,7 @@ function generate_board_url($without_script_path = false)
*/
function redirect($url, $return = false)
{
global $db, $cache, $config, $user;
global $db, $cache, $config, $user, $phpbb_root_path;
if (empty($user->lang))
{
@@ -1521,8 +1521,8 @@ function redirect($url, $return = false)
}
else
{
// Get the realpath of dirname
$root_dirs = explode('/', str_replace('\\', '/', phpbb_realpath('./')));
// Used ./ before, but $phpbb_root_path is working better with urls within another root path
$root_dirs = explode('/', str_replace('\\', '/', phpbb_realpath($phpbb_root_path)));
$page_dirs = explode('/', str_replace('\\', '/', phpbb_realpath($pathinfo['dirname'])));
$intersection = array_intersect_assoc($root_dirs, $page_dirs);