diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-03-22 23:17:06 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-03-22 23:17:06 +0000 |
| commit | c2ded8a7aa253afaacb63ed6a987e600b0a92af8 (patch) | |
| tree | eec24abea0b8f1f53b3b872be8ec04ed0e7c185e /phpBB/privmsg.php | |
| parent | 9f651601a31578b7bfb59f445483863d567a4d95 (diff) | |
| download | forums-c2ded8a7aa253afaacb63ed6a987e600b0a92af8.tar forums-c2ded8a7aa253afaacb63ed6a987e600b0a92af8.tar.gz forums-c2ded8a7aa253afaacb63ed6a987e600b0a92af8.tar.bz2 forums-c2ded8a7aa253afaacb63ed6a987e600b0a92af8.tar.xz forums-c2ded8a7aa253afaacb63ed6a987e600b0a92af8.zip | |
More header fixing
git-svn-id: file:///svn/phpbb/trunk@2411 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/privmsg.php')
| -rw-r--r-- | phpBB/privmsg.php | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/phpBB/privmsg.php b/phpBB/privmsg.php index 2edb6edc7c..879f2ae04e 100644 --- a/phpBB/privmsg.php +++ b/phpBB/privmsg.php @@ -38,8 +38,8 @@ if( !empty($board_config['privmsg_disable']) ) // // Var definitions // -$html_entities_match = array("#&#", "#<#", "#>#"); -$html_entities_replace = array("&", "<", ">"); +$html_entities_match = array('#&#', '#<#', '#>#'); +$html_entities_replace = array('&', '<', '>'); // // Parameters @@ -61,14 +61,14 @@ if( isset($HTTP_POST_VARS['folder']) || isset($HTTP_GET_VARS['folder']) ) { $folder = ( isset($HTTP_POST_VARS['folder']) ) ? $HTTP_POST_VARS['folder'] : $HTTP_GET_VARS['folder']; - if( $folder != "inbox" && $folder != "outbox" && $folder != "sentbox" && $folder != "savebox" ) + if( $folder != 'inbox' && $folder != 'outbox' && $folder != 'sentbox' && $folder != 'savebox' ) { - $folder = "inbox"; + $folder = 'inbox'; } } else { - $folder = "inbox"; + $folder = 'inbox'; } // @@ -76,7 +76,7 @@ else // if( $cancel ) { - header("Location: " . append_sid("privmsg.$phpEx?folder=$folder", true)); + header('Location: ' . append_sid("privmsg.$phpEx?folder=$folder", true)); } // @@ -183,7 +183,8 @@ else if( $mode == "read" ) if( !$userdata['session_logged_in'] ) { - header("Location: " . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode&" . POST_POST_URL . "=$privmsgs_id", true)); + $header_location = ( @preg_match("/Microsoft|WebSTAR/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; + header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode&" . POST_POST_URL . "=$privmsgs_id", true)); } if( $folder ) @@ -256,7 +257,8 @@ else if( $mode == "read" ) // if( !( $privmsg = $db->sql_fetchrow($pm_status) ) ) { - header("Location: " . append_sid("privmsg.$phpEx?folder=$folder", true)); + $header_location = ( @preg_match("/Microsoft|WebSTAR/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; + header($header_location . append_sid("privmsg.$phpEx?folder=$folder", true)); } $privmsg_id = $privmsg['privmsgs_id']; @@ -588,7 +590,8 @@ else if( ( $delete && $mark_list ) || $delete_all ) { if(!$userdata['session_logged_in']) { - header("Location: " . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true)); + $header_location = ( @preg_match("/Microsoft|WebSTAR/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; + header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true)); } if( isset($mark_list) && !is_array($mark_list) ) { @@ -783,7 +786,8 @@ else if( $save && $mark_list && $folder != "savebox" && $folder != "outbox") { if( !$userdata['session_logged_in'] ) { - header("Location: " . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true)); + $header_location = ( @preg_match("/Microsoft|WebSTAR/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; + header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true)); } // @@ -875,7 +879,8 @@ else if( $submit || $refresh || $mode != "" ) if(!$userdata['session_logged_in']) { $user_id = ( isset($HTTP_GET_VARS[POST_USERS_URL]) ) ? "&" . POST_USERS_URL . "=" . $HTTP_GET_VARS[POST_USERS_URL] : ""; - header("Location: " . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode" . $user_id, true)); + $header_location = ( @preg_match("/Microsoft|WebSTAR/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; + header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode" . $user_id, true)); } // @@ -1272,13 +1277,12 @@ else if( $submit || $refresh || $mode != "" ) { message_die(GENERAL_ERROR, "Could not obtain private message for editing.", "", __LINE__, __FILE__, $sql); } - if(!$db->sql_numrows($pm_edit_status)) + if ( !($privmsg = $db->sql_fetchrow($pm_edit_status)) ) { - header("Location: " . append_sid("privmsg.$phpEx?folder=$folder", true)); + $header_location = ( @preg_match("/Microsoft|WebSTAR/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; + header($header_location . append_sid("privmsg.$phpEx?folder=$folder", true)); } - $privmsg = $db->sql_fetchrow($pm_edit_status); - $privmsg_subject = $privmsg['privmsgs_subject']; $privmsg_message = $privmsg['privmsgs_text']; $privmsg_bbcode_uid = $privmsg['privmsgs_bbcode_uid']; @@ -1312,11 +1316,11 @@ else if( $submit || $refresh || $mode != "" ) message_die(GENERAL_ERROR, "Could not obtain private message for editing.", "", __LINE__, __FILE__, $sql); } - if( !$db->sql_numrows($pm_reply_status) ) + if( !($privmsg = $db->sql_fetchrow($pm_reply_status)) ) { - header("Location: " . append_sid("privmsg.$phpEx?folder=$folder", true)); + $header_location = ( @preg_match("/Microsoft|WebSTAR/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; + header($header_location . append_sid("privmsg.$phpEx?folder=$folder", true)); } - $privmsg = $db->sql_fetchrow($pm_reply_status); $privmsg_subject = ( ( !preg_match("/^Re:/", $privmsg['privmsgs_subject']) ) ? "Re: " : "" ) . $privmsg['privmsgs_subject']; @@ -1668,7 +1672,8 @@ else if( $submit || $refresh || $mode != "" ) // if( !$userdata['session_logged_in'] ) { - header("Location: " . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true)); + $header_location = ( @preg_match("/Microsoft|WebSTAR/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; + header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true)); } // |
