aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-01-27 15:16:08 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-01-27 15:16:08 +0000
commit849d76697444f4e3523845f8c96569ccde57d868 (patch)
treed0d62d1633974d44e4843d66d5685adaa8064c9b
parentb138aabd5b7ea0b2426f702a6f45b6da39679edd (diff)
downloadforums-849d76697444f4e3523845f8c96569ccde57d868.tar
forums-849d76697444f4e3523845f8c96569ccde57d868.tar.gz
forums-849d76697444f4e3523845f8c96569ccde57d868.tar.bz2
forums-849d76697444f4e3523845f8c96569ccde57d868.tar.xz
forums-849d76697444f4e3523845f8c96569ccde57d868.zip
header Location mod to cope with IIS ... I hope
git-svn-id: file:///svn/phpbb/trunk@1972 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/login.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/phpBB/login.php b/phpBB/login.php
index 110a822802..bd75f72c2f 100644
--- a/phpBB/login.php
+++ b/phpBB/login.php
@@ -30,7 +30,6 @@ $phpbb_root_path = "./";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
-
//
// Set page ID for session management
//
@@ -42,6 +41,13 @@ init_userprefs($userdata);
if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($HTTP_POST_VARS['logout']) || isset($HTTP_GET_VARS['logout']) )
{
+ //
+ // 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/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
+
if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && !$userdata['session_logged_in'] )
{
$username = isset($HTTP_POST_VARS['username']) ? $HTTP_POST_VARS['username'] : "";
@@ -62,7 +68,7 @@ if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($
{
if( $rowresult['user_level'] != ADMIN && $board_config['board_disable'] )
{
- header("Location: " . append_sid("index.$phpEx", true));
+ header($header_location . append_sid("index.$phpEx", true));
}
else
{
@@ -76,11 +82,11 @@ if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($
{
if( !empty($HTTP_POST_VARS['redirect']) )
{
- header("Location: " . append_sid($HTTP_POST_VARS['redirect'], true));
+ header($header_location . append_sid($HTTP_POST_VARS['redirect'], true));
}
else
{
- header("Location: " . append_sid("index.$phpEx", true));
+ header($header_location . append_sid("index.$phpEx", true));
}
}
else
@@ -124,22 +130,22 @@ if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($
if( !empty($HTTP_POST_VARS['redirect']) )
{
- header("Location: " . append_sid($HTTP_POST_VARS['redirect'], true));
+ header($header_location . append_sid($HTTP_POST_VARS['redirect'], true));
}
else
{
- header("Location: " . append_sid("index.$phpEx", true));
+ header($header_location . append_sid("index.$phpEx", true));
}
}
else
{
if( !empty($HTTP_POST_VARS['redirect']) )
{
- header("Location: " . append_sid($HTTP_POST_VARS['redirect'], true));
+ header($header_location . append_sid($HTTP_POST_VARS['redirect'], true));
}
else
{
- header("Location: " . append_sid("index.$phpEx", true));
+ header($header_location . append_sid("index.$phpEx", true));
}
}
}