diff options
| author | Henry Sudhof <kellanved@phpbb.com> | 2008-06-06 11:28:55 +0000 |
|---|---|---|
| committer | Henry Sudhof <kellanved@phpbb.com> | 2008-06-06 11:28:55 +0000 |
| commit | 4dddc3a13093862bc70c1320bd310311246cb7bb (patch) | |
| tree | 746f75502440fb144f53ed40a39d99568e434c5b /phpBB/includes/functions.php | |
| parent | 8822747b91883b0b9ddf322ce052ccb11f4429d5 (diff) | |
| download | forums-4dddc3a13093862bc70c1320bd310311246cb7bb.tar forums-4dddc3a13093862bc70c1320bd310311246cb7bb.tar.gz forums-4dddc3a13093862bc70c1320bd310311246cb7bb.tar.bz2 forums-4dddc3a13093862bc70c1320bd310311246cb7bb.tar.xz forums-4dddc3a13093862bc70c1320bd310311246cb7bb.zip | |
Some xenophobia
git-svn-id: file:///svn/phpbb/trunk@8612 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
| -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 6b5efd3559..4a42d4a211 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1773,7 +1773,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] == '/') { @@ -1987,11 +1990,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 @@ -2283,7 +2289,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>')); } |
