|
From: Paul S. O. <ps...@us...> - 2002-01-27 15:16:11
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv31997
Modified Files:
login.php
Log Message:
header Location mod to cope with IIS ... I hope
Index: login.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/login.php,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -r1.37 -r1.38
*** login.php 2001/12/21 15:51:31 1.37
--- login.php 2002/01/27 15:16:08 1.38
***************
*** 31,35 ****
include($phpbb_root_path . 'common.'.$phpEx);
-
//
// Set page ID for session management
--- 31,34 ----
***************
*** 43,46 ****
--- 42,52 ----
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'] )
{
***************
*** 63,67 ****
if( $rowresult['user_level'] != ADMIN && $board_config['board_disable'] )
{
! header("Location: " . append_sid("index.$phpEx", true));
}
else
--- 69,73 ----
if( $rowresult['user_level'] != ADMIN && $board_config['board_disable'] )
{
! header($header_location . append_sid("index.$phpEx", true));
}
else
***************
*** 77,85 ****
if( !empty($HTTP_POST_VARS['redirect']) )
{
! header("Location: " . append_sid($HTTP_POST_VARS['redirect'], true));
}
else
{
! header("Location: " . append_sid("index.$phpEx", true));
}
}
--- 83,91 ----
if( !empty($HTTP_POST_VARS['redirect']) )
{
! header($header_location . append_sid($HTTP_POST_VARS['redirect'], true));
}
else
{
! header($header_location . append_sid("index.$phpEx", true));
}
}
***************
*** 125,133 ****
if( !empty($HTTP_POST_VARS['redirect']) )
{
! header("Location: " . append_sid($HTTP_POST_VARS['redirect'], true));
}
else
{
! header("Location: " . append_sid("index.$phpEx", true));
}
}
--- 131,139 ----
if( !empty($HTTP_POST_VARS['redirect']) )
{
! header($header_location . append_sid($HTTP_POST_VARS['redirect'], true));
}
else
{
! header($header_location . append_sid("index.$phpEx", true));
}
}
***************
*** 136,144 ****
if( !empty($HTTP_POST_VARS['redirect']) )
{
! header("Location: " . append_sid($HTTP_POST_VARS['redirect'], true));
}
else
{
! header("Location: " . append_sid("index.$phpEx", true));
}
}
--- 142,150 ----
if( !empty($HTTP_POST_VARS['redirect']) )
{
! header($header_location . append_sid($HTTP_POST_VARS['redirect'], true));
}
else
{
! header($header_location . append_sid("index.$phpEx", true));
}
}
|