diff options
author | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2002-10-09 19:50:48 +0000 |
---|---|---|
committer | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2002-10-09 19:50:48 +0000 |
commit | 369189806bf4bf85fe0409e6f66919ab4f4b70cd (patch) | |
tree | 988680c7700c818b42e2170a9d7d887efa3c812b /phpBB/login.php | |
parent | ac4b54ff4dea78aaeec015685b1c02a66449f1f1 (diff) | |
download | forums-369189806bf4bf85fe0409e6f66919ab4f4b70cd.tar forums-369189806bf4bf85fe0409e6f66919ab4f4b70cd.tar.gz forums-369189806bf4bf85fe0409e6f66919ab4f4b70cd.tar.bz2 forums-369189806bf4bf85fe0409e6f66919ab4f4b70cd.tar.xz forums-369189806bf4bf85fe0409e6f66919ab4f4b70cd.zip |
Added the redirect() function for nice and clean redirection.
git-svn-id: file:///svn/phpbb/trunk@2948 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/login.php')
-rw-r--r-- | phpBB/login.php | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/phpBB/login.php b/phpBB/login.php index b6f9e54554..ab62485cab 100644 --- a/phpBB/login.php +++ b/phpBB/login.php @@ -32,16 +32,10 @@ $auth = new auth($userdata); $user = new user($userdata); // End session management -// -// This appears to work for IIS5 CGI under Win2K. Uses getenv since this doesn't exist for -// ISAPI mode and therefore the normal Location redirector is used in preference -// -$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; - extract($_GET); extract($_POST); -$redirect = ( !empty($redirect) ) ? $_SERVER['QUERY_STRING'] : ''; +$redirect = (!empty($redirect)) ? $_SERVER['QUERY_STRING'] : ''; // Do the login/logout/form/whatever if ( isset($login) || isset($logout) ) @@ -55,8 +49,7 @@ if ( isset($login) || isset($logout) ) // if ( $board_config['board_disable'] && !$auth->acl_get('a_') ) { - header($header_location . "index.$phpEx$SID"); - exit; + redirect("index.$phpEx$SID"); } if ( !$auth->login($username, $password, $autologin) ) @@ -78,8 +71,7 @@ if ( isset($login) || isset($logout) ) // Redirect to wherever we're supposed to go ... // $redirect_url = ( $redirect ) ? preg_replace('/^.*?redirect=(.*?)&(.*?)$/', '\\1' . $SID . '&\\2', $redirect) : 'index.'.$phpEx; - header($header_location . $redirect_url); - exit; + redirect($redirect_url); } if ( !$userdata['user_id'] ) @@ -105,8 +97,7 @@ if ( !$userdata['user_id'] ) } else { - header($header_location . "index.$phpEx$SID"); - exit; + redirect("index.$phpEx$SID"); } ?>
\ No newline at end of file |