mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-10 01:25:33 +02:00
added two comments to describe the functions use-case
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8643 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
4444e48d2e
commit
26f51cf5b3
@ -1801,6 +1801,7 @@ function generate_board_url($without_script_path = false)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Redirects the user to another page then exits the script nicely
|
* Redirects the user to another page then exits the script nicely
|
||||||
|
* This function is intended for urls within the board. It's not meant to redirect to cross-domains.
|
||||||
*/
|
*/
|
||||||
function redirect($url, $return = false)
|
function redirect($url, $return = false)
|
||||||
{
|
{
|
||||||
@ -1829,6 +1830,7 @@ function redirect($url, $return = false)
|
|||||||
}
|
}
|
||||||
else if (!empty($url_parts['scheme']) && !empty($url_parts['host']))
|
else if (!empty($url_parts['scheme']) && !empty($url_parts['host']))
|
||||||
{
|
{
|
||||||
|
// Attention: only able to redirect within the same domain (yourdomain.com -> www.yourdomain.com will not work)
|
||||||
if ($url_parts['host'] !== $user->host)
|
if ($url_parts['host'] !== $user->host)
|
||||||
{
|
{
|
||||||
$url = generate_board_url();
|
$url = generate_board_url();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user