diff options
author | Henry Sudhof <kellanved@phpbb.com> | 2008-06-06 11:27:51 +0000 |
---|---|---|
committer | Henry Sudhof <kellanved@phpbb.com> | 2008-06-06 11:27:51 +0000 |
commit | cd058dd9fe9f86aedb1d864ae78a17cd41003987 (patch) | |
tree | c33a138cfe6ee34a88244e9c3f8c1efadfeb4541 /phpBB/includes | |
parent | fa01fd7da44008d141ba91e6c345a3c2bef334cb (diff) | |
download | forums-cd058dd9fe9f86aedb1d864ae78a17cd41003987.tar forums-cd058dd9fe9f86aedb1d864ae78a17cd41003987.tar.gz forums-cd058dd9fe9f86aedb1d864ae78a17cd41003987.tar.bz2 forums-cd058dd9fe9f86aedb1d864ae78a17cd41003987.tar.xz forums-cd058dd9fe9f86aedb1d864ae78a17cd41003987.zip |
Some xenophobia
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8611 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index ba12fd6e4e..43e89c10fa 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1829,7 +1829,10 @@ function redirect($url, $return = false) } else if (!empty($url_parts['scheme']) && !empty($url_parts['host'])) { - // Full URL + if ($url_parts['host'] !== $user->host) + { + $url = generate_board_url(true); + } } else if ($url[0] == '/') { @@ -2045,11 +2048,14 @@ function meta_refresh($time, $url) global $template; $url = redirect($url, true); + $url = str_replace('&', '&', $url); // For XHTML compatibility we change back & to & $template->assign_vars(array( - 'META' => '<meta http-equiv="refresh" content="' . $time . ';url=' . str_replace('&', '&', $url) . '" />') + 'META' => '<meta http-equiv="refresh" content="' . $time . ';url=' . $url . '" />') ); + + return $url; } //Form validation @@ -2331,7 +2337,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa return; } - meta_refresh(3, $redirect); + $redirect = meta_refresh(3, $redirect); trigger_error($message . '<br /><br />' . sprintf($l_redirect, '<a href="' . $redirect . '">', '</a>')); } |