mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
redirect header changes
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3154 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
6de7055e80
commit
4ef1441bea
16 changed files with 71 additions and 127 deletions
|
@ -50,11 +50,9 @@ if (empty($HTTP_POST_VARS['send_file']))
|
|||
require('./pagestart.' . $phpEx);
|
||||
}
|
||||
|
||||
if( $cancel )
|
||||
if ($cancel)
|
||||
{
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . append_sid("admin_styles.$phpEx"));
|
||||
exit;
|
||||
redirect('admin/' . append_sid("admin_styles.$phpEx", true));
|
||||
}
|
||||
|
||||
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
||||
|
|
|
@ -40,9 +40,7 @@ init_userprefs($userdata);
|
|||
|
||||
if (!$userdata['session_logged_in'])
|
||||
{
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . '../' . append_sid("login.$phpEx?redirect=admin/"));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=admin/", true));
|
||||
}
|
||||
else if ($userdata['user_level'] != ADMIN)
|
||||
{
|
||||
|
@ -55,9 +53,7 @@ if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
|
|||
$url = preg_replace('/\?$/', '', $url);
|
||||
$url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id'];
|
||||
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . $url);
|
||||
exit;
|
||||
redirect($url);
|
||||
}
|
||||
|
||||
if (empty($no_page_header))
|
||||
|
|
|
@ -119,7 +119,7 @@ h3 {font-size:12pt;color:blue}
|
|||
<li>Fixed non-pruning of watched topics table when pruning related topics</li>
|
||||
<li>Enable GET redirect on logout</li>
|
||||
<li>Added check for IE6.x to viewtopic ICQ indicator javascript</li>
|
||||
<li>Fixed empty username quoting owith MS-SQL</li>
|
||||
<li>Fixed empty username quoting with MS-SQL</li>
|
||||
<li>Fixed BBCode url, magic url and img tags to allow most chars beyond domain names</li>
|
||||
<li>Prevent parsing of -ve size values in BBCode size tag</li>
|
||||
<li>Back ported HTML handler from 2.2, this may impact some boards which allow complex HTML - existing parser remains but commented out</li>
|
||||
|
@ -130,7 +130,8 @@ h3 {font-size:12pt;color:blue}
|
|||
<li>Fixes for paths under Apache2</li>
|
||||
<li>Added wrap text with tag support for posting in Mozilla 1.1+</li>
|
||||
<li>Fixed use of missing CSS classes in modcp_split, group_info_body, error_body and agreement</li>
|
||||
<li></li>
|
||||
<li>Fixed ability of users to edit polls even after they have received votes</li>
|
||||
<li>Fixed header Location to be absolute URL as per HTTP 1.1 spec - noted by <b>PhilippK</b></li>
|
||||
<li></li>
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -151,15 +151,13 @@ $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) :
|
|||
//
|
||||
// Default var values
|
||||
//
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
$is_moderator = FALSE;
|
||||
|
||||
if ( isset($HTTP_POST_VARS['groupstatus']) && $group_id )
|
||||
{
|
||||
if ( !$userdata['session_logged_in'] )
|
||||
{
|
||||
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
}
|
||||
|
||||
$sql = "SELECT group_moderator
|
||||
|
@ -208,8 +206,7 @@ else if ( isset($HTTP_POST_VARS['joingroup']) && $group_id )
|
|||
//
|
||||
if ( !$userdata['session_logged_in'] )
|
||||
{
|
||||
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
}
|
||||
|
||||
$sql = "SELECT ug.user_id, g.group_type
|
||||
|
@ -310,13 +307,11 @@ else if ( isset($HTTP_POST_VARS['unsub']) || isset($HTTP_POST_VARS['unsubpending
|
|||
//
|
||||
if ( $cancel )
|
||||
{
|
||||
header($header_location . append_sid("groupcp.$phpEx", true));
|
||||
exit;
|
||||
redirect(append_sid("groupcp.$phpEx", true));
|
||||
}
|
||||
elseif ( !$userdata['session_logged_in'] )
|
||||
{
|
||||
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
}
|
||||
|
||||
if ( $confirm )
|
||||
|
@ -399,8 +394,7 @@ else if ( $group_id )
|
|||
{
|
||||
if ( !$userdata['session_logged_in'] )
|
||||
{
|
||||
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -461,8 +455,7 @@ else if ( $group_id )
|
|||
{
|
||||
if ( !$userdata['session_logged_in'] )
|
||||
{
|
||||
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
}
|
||||
|
||||
if ( !$is_moderator )
|
||||
|
|
|
@ -690,4 +690,25 @@ if ( !function_exists(realpath) )
|
|||
return $path;
|
||||
}
|
||||
}
|
||||
|
||||
function redirect($url)
|
||||
{
|
||||
global $board_config;
|
||||
|
||||
$server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://';
|
||||
$server_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['server_name']));
|
||||
$script_name = preg_replace('/^\/?(.*?)\/?$/', '/\1', trim($board_config['script_path']));
|
||||
$server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) . '/' : '/';
|
||||
$url = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($url));
|
||||
|
||||
// If redirects don't work for you, first make sure you've entered your server (domain) name,
|
||||
// script path, protocol (insecure (http://) or secure (https://) cookie) and port
|
||||
// correctly in admin -> general -> configuration ... if they are fine, uncomment the following
|
||||
// line and replace 'Location: ' . with $header_location . in the line following it.
|
||||
|
||||
// $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header('Location: ' . $server_protocol . $server_name . $script_name . $server_port . $url);
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
|
@ -303,7 +303,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
|||
//
|
||||
// Add poll
|
||||
//
|
||||
if ( ( $mode == 'newtopic' || $mode == 'editpost' ) && !empty($poll_title) && count($poll_options) >= 2 )
|
||||
if (($mode == 'newtopic' || ($mode == 'editpost' && $post_data['edit_poll'])) && !empty($poll_title) && count($poll_options) >= 2)
|
||||
{
|
||||
$sql = ( !$post_data['has_poll'] ) ? "INSERT INTO " . VOTE_DESC_TABLE . " (topic_id, vote_text, vote_start, vote_length) VALUES ($topic_id, '$poll_title', $current_time, " . ( $poll_length * 86400 ) . ")" : "UPDATE " . VOTE_DESC_TABLE . " SET vote_text = '$poll_title', vote_length = " . ( $poll_length * 86400 ) . " WHERE topic_id = $topic_id";
|
||||
if ( !$db->sql_query($sql) )
|
||||
|
|
|
@ -38,8 +38,7 @@ else
|
|||
|
||||
if ( !$userdata['session_logged_in'] )
|
||||
{
|
||||
header('Location: ' . append_sid("login.$phpEx?redirect=profile.$phpEx&mode=email&" . POST_USERS_URL . "=$user_id", true));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=email&" . POST_USERS_URL . "=$user_id", true));
|
||||
}
|
||||
|
||||
$sql = "SELECT username, user_email, user_viewemail, user_lang
|
||||
|
|
|
@ -40,8 +40,6 @@ init_userprefs($userdata);
|
|||
// End session management
|
||||
//
|
||||
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
|
||||
if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($HTTP_POST_VARS['logout']) || isset($HTTP_GET_VARS['logout']) )
|
||||
{
|
||||
//
|
||||
|
@ -66,8 +64,7 @@ if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($
|
|||
{
|
||||
if( $row['user_level'] != ADMIN && $board_config['board_disable'] )
|
||||
{
|
||||
header($header_location . append_sid("index.$phpEx", true));
|
||||
exit;
|
||||
redirect(append_sid("index.$phpEx", true));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -79,16 +76,8 @@ if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($
|
|||
|
||||
if( $session_id )
|
||||
{
|
||||
if( !empty($HTTP_POST_VARS['redirect']) )
|
||||
{
|
||||
header($header_location . append_sid($HTTP_POST_VARS['redirect'], true));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header($header_location . append_sid("index.$phpEx", true));
|
||||
exit;
|
||||
}
|
||||
$url = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : "index.$phpEx";
|
||||
redirect(append_sid($url, true));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -133,28 +122,18 @@ if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($
|
|||
|
||||
if (!empty($HTTP_POST_VARS['redirect']) || !empty($HTTP_GET_VARS['redirect']))
|
||||
{
|
||||
$redirect = (!empty($HTTP_POST_VARS['redirect'])) ? $HTTP_POST_VARS['redirect'] : $HTTP_GET_VARS['redirect'];
|
||||
header($header_location . append_sid($redirect, true));
|
||||
exit;
|
||||
$url = (!empty($HTTP_POST_VARS['redirect'])) ? $HTTP_POST_VARS['redirect'] : $HTTP_GET_VARS['redirect'];
|
||||
redirect(append_sid($url, true));
|
||||
}
|
||||
else
|
||||
{
|
||||
header($header_location . append_sid("index.$phpEx", true));
|
||||
exit;
|
||||
redirect(append_sid("index.$phpEx", true));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !empty($HTTP_POST_VARS['redirect']) )
|
||||
{
|
||||
header($header_location . append_sid($HTTP_POST_VARS['redirect'], true));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header($header_location . append_sid("index.$phpEx", true));
|
||||
exit;
|
||||
}
|
||||
$url = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : "index.$phpEx";
|
||||
redirect(append_sid($url, true));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -231,8 +210,7 @@ else
|
|||
}
|
||||
else
|
||||
{
|
||||
header($header_location . append_sid("index.$phpEx", true));
|
||||
exit;
|
||||
redirect(append_sid("index.$phpEx", true));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -171,9 +171,7 @@ if ( isset($HTTP_POST_VARS['cancel']) )
|
|||
$redirect = "index.$phpEx";
|
||||
}
|
||||
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . append_sid($redirect, true));
|
||||
exit;
|
||||
redirect(append_sid($redirect, true));
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -116,9 +116,7 @@ if ( isset($HTTP_POST_VARS['cancel']) )
|
|||
$post_append = '';
|
||||
}
|
||||
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . append_sid($redirect, true) . $post_append);
|
||||
exit;
|
||||
redirect(append_sid($redirect, true) . $post_append);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -368,9 +366,7 @@ if ( !$is_auth[$is_auth_type] )
|
|||
break;
|
||||
}
|
||||
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . append_sid("login.$phpEx?redirect=posting.$phpEx&" . $redirect, true));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=posting.$phpEx&" . $redirect, true));
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1063,7 +1059,7 @@ $template->assign_vars(array(
|
|||
//
|
||||
// Poll entry switch/output
|
||||
//
|
||||
if( ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) ) && $is_auth['auth_pollcreate'] )
|
||||
if( ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['edit_poll']) ) && $is_auth['auth_pollcreate'] )
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'L_ADD_A_POLL' => $lang['Add_poll'],
|
||||
|
|
|
@ -83,9 +83,7 @@ init_userprefs($userdata);
|
|||
//
|
||||
if ( $cancel )
|
||||
{
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . append_sid("privmsg.$phpEx?folder=$folder", true));
|
||||
exit;
|
||||
redirect(append_sid("privmsg.$phpEx?folder=$folder", true));
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -183,9 +181,7 @@ else if ( $mode == 'read' )
|
|||
|
||||
if ( !$userdata['session_logged_in'] )
|
||||
{
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', 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));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode&" . POST_POST_URL . "=$privmsgs_id", true));
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -245,9 +241,7 @@ else if ( $mode == 'read' )
|
|||
//
|
||||
if ( !($privmsg = $db->sql_fetchrow($result)) )
|
||||
{
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . append_sid("privmsg.$phpEx?folder=$folder", true));
|
||||
exit;
|
||||
redirect(append_sid("privmsg.$phpEx?folder=$folder", true));
|
||||
}
|
||||
|
||||
$privmsg_id = $privmsg['privmsgs_id'];
|
||||
|
@ -648,9 +642,7 @@ else if ( ( $delete && $mark_list ) || $delete_all )
|
|||
{
|
||||
if ( !$userdata['session_logged_in'] )
|
||||
{
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true));
|
||||
}
|
||||
if ( isset($mark_list) && !is_array($mark_list) )
|
||||
{
|
||||
|
@ -847,9 +839,7 @@ else if ( $save && $mark_list && $folder != 'savebox' && $folder != 'outbox' )
|
|||
{
|
||||
if ( !$userdata['session_logged_in'] )
|
||||
{
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true));
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -953,9 +943,7 @@ else if ( $submit || $refresh || $mode != '' )
|
|||
if ( !$userdata['session_logged_in'] )
|
||||
{
|
||||
$user_id = ( isset($HTTP_GET_VARS[POST_USERS_URL]) ) ? '&' . POST_USERS_URL . '=' . intval($HTTP_GET_VARS[POST_USERS_URL]) : '';
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode" . $user_id, true));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode" . $user_id, true));
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1319,9 +1307,7 @@ else if ( $submit || $refresh || $mode != '' )
|
|||
|
||||
if ( !($privmsg = $db->sql_fetchrow($result)) )
|
||||
{
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . append_sid("privmsg.$phpEx?folder=$folder", true));
|
||||
exit;
|
||||
redirect(append_sid("privmsg.$phpEx?folder=$folder", true));
|
||||
}
|
||||
|
||||
$privmsg_subject = $privmsg['privmsgs_subject'];
|
||||
|
@ -1359,9 +1345,7 @@ else if ( $submit || $refresh || $mode != '' )
|
|||
|
||||
if ( !($privmsg = $db->sql_fetchrow($result)) )
|
||||
{
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . append_sid("privmsg.$phpEx?folder=$folder", true));
|
||||
exit;
|
||||
redirect(append_sid("privmsg.$phpEx?folder=$folder", true));
|
||||
}
|
||||
|
||||
$privmsg_subject = ( ( !preg_match('/^Re:/', $privmsg['privmsgs_subject']) ) ? 'Re: ' : '' ) . $privmsg['privmsgs_subject'];
|
||||
|
@ -1691,9 +1675,7 @@ else if ( $submit || $refresh || $mode != '' )
|
|||
//
|
||||
if ( !$userdata['session_logged_in'] )
|
||||
{
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true));
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -83,9 +83,7 @@ if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
|||
{
|
||||
if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
|
||||
{
|
||||
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
|
||||
header($header_location . append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
|
||||
}
|
||||
|
||||
include($phpbb_root_path . 'includes/usercp_register.'.$phpEx);
|
||||
|
@ -109,9 +107,7 @@ if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
|||
}
|
||||
else
|
||||
{
|
||||
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
|
||||
header($header_location . append_sid("index.$phpEx", true));
|
||||
exit;
|
||||
redirect(append_sid("index.$phpEx", true));
|
||||
}
|
||||
|
||||
?>
|
|
@ -162,8 +162,7 @@ else if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
}
|
||||
else
|
||||
{
|
||||
header("Location: login.$phpEx?redirect=search.$phpEx&search_id=newposts", true);
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=search.$phpEx&search_id=newposts", true));
|
||||
}
|
||||
|
||||
$show_results = 'topics';
|
||||
|
@ -180,8 +179,7 @@ else if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
}
|
||||
else
|
||||
{
|
||||
header("Location: login.$phpEx?redirect=search.$phpEx&search_id=egosearch", true);
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=search.$phpEx&search_id=egosearch", true));
|
||||
}
|
||||
|
||||
$show_results = 'topics';
|
||||
|
|
|
@ -37,9 +37,7 @@ if ( !defined('INSTALLING') )
|
|||
|
||||
if( defined("PHPBB_INSTALLED") )
|
||||
{
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . " index.$phpEx");
|
||||
exit;
|
||||
redirect("index.$phpEx);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -103,9 +103,7 @@ if ( !$is_auth['auth_read'] || !$is_auth['auth_view'] )
|
|||
if ( !$userdata['session_logged_in'] )
|
||||
{
|
||||
$redirect = POST_FORUM_URL . "=$forum_id" . ( ( isset($start) ) ? "&start=$start" : '' );
|
||||
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
|
||||
header($header_location . append_sid("login.$phpEx?redirect=viewforum.$phpEx&$redirect", true));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=viewforum.$phpEx&$redirect", true));
|
||||
}
|
||||
//
|
||||
// The user is not authed to read this forum ...
|
||||
|
|
|
@ -58,8 +58,6 @@ if ( isset($HTTP_GET_VARS['view']) && empty($HTTP_GET_VARS[POST_POST_URL]) )
|
|||
{
|
||||
if ( $HTTP_GET_VARS['view'] == 'newest' )
|
||||
{
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
|
||||
if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_GET_VARS['sid']) )
|
||||
{
|
||||
$session_id = isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) ? $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid'] : $HTTP_GET_VARS['sid'];
|
||||
|
@ -88,14 +86,12 @@ if ( isset($HTTP_GET_VARS['view']) && empty($HTTP_GET_VARS[POST_POST_URL]) )
|
|||
$post_id = $row['post_id'];
|
||||
|
||||
$SID = (isset($HTTP_GET_VARS['sid'])) ? 'sid=' . $session_id : '';
|
||||
header($header_location . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id", true));
|
||||
exit;
|
||||
redirect(append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id", true));
|
||||
}
|
||||
}
|
||||
|
||||
$db->sql_close();
|
||||
header($header_location . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true));
|
||||
exit;
|
||||
redirect(append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true));
|
||||
}
|
||||
else if ( $HTTP_GET_VARS['view'] == 'next' || $HTTP_GET_VARS['view'] == 'previous' )
|
||||
{
|
||||
|
@ -178,9 +174,7 @@ if( !$is_auth['auth_view'] || !$is_auth['auth_read'] )
|
|||
{
|
||||
$redirect = ( isset($post_id) ) ? POST_POST_URL . "=$post_id" : POST_TOPIC_URL . "=$topic_id";
|
||||
$redirect .= ( isset($start) ) ? "&start=$start" : '';
|
||||
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
|
||||
header($header_location . append_sid("login.$phpEx?redirect=viewtopic.$phpEx&$redirect", true));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=viewtopic.$phpEx&$redirect", true));
|
||||
}
|
||||
|
||||
$message = ( !$is_auth['auth_view'] ) ? $lang['Topic_post_not_exist'] : sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type']);
|
||||
|
@ -296,9 +290,7 @@ else
|
|||
{
|
||||
if ( $HTTP_GET_VARS['unwatch'] == 'topic' )
|
||||
{
|
||||
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
|
||||
header($header_location . append_sid("login.$phpEx?redirect=viewtopic.$phpEx&" . POST_TOPIC_URL . "=$topic_id&unwatch=topic", true));
|
||||
exit;
|
||||
redirect(append_sid("login.$phpEx?redirect=viewtopic.$phpEx&" . POST_TOPIC_URL . "=$topic_id&unwatch=topic", true));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue