mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Changes to add session_id to newest redirect were failing ... fixed
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3299 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
94856fcb83
commit
88731651b0
2 changed files with 15 additions and 6 deletions
|
@ -697,7 +697,12 @@ function phpbb_realpath($path)
|
||||||
|
|
||||||
function redirect($url)
|
function redirect($url)
|
||||||
{
|
{
|
||||||
global $board_config;
|
global $db, $board_config;
|
||||||
|
|
||||||
|
if (!empty($db))
|
||||||
|
{
|
||||||
|
$db->sql_close();
|
||||||
|
}
|
||||||
|
|
||||||
$server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://';
|
$server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://';
|
||||||
$server_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['server_name']));
|
$server_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['server_name']));
|
||||||
|
|
|
@ -82,15 +82,19 @@ if ( isset($HTTP_GET_VARS['view']) && empty($HTTP_GET_VARS[POST_POST_URL]) )
|
||||||
message_die(GENERAL_MESSAGE, 'No_new_posts_last_visit');
|
message_die(GENERAL_MESSAGE, 'No_new_posts_last_visit');
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->sql_close();
|
|
||||||
$post_id = $row['post_id'];
|
$post_id = $row['post_id'];
|
||||||
|
|
||||||
$SID = (isset($HTTP_GET_VARS['sid'])) ? 'sid=' . $session_id : '';
|
if (isset($HTTP_GET_VARS['sid']))
|
||||||
redirect(append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id", true));
|
{
|
||||||
|
redirect("viewtopic.$phpEx?sid=$session_id&" . POST_POST_URL . "=$post_id#$post_id");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
redirect("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->sql_close();
|
|
||||||
redirect(append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true));
|
redirect(append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true));
|
||||||
}
|
}
|
||||||
else if ( $HTTP_GET_VARS['view'] == 'next' || $HTTP_GET_VARS['view'] == 'previous' )
|
else if ( $HTTP_GET_VARS['view'] == 'next' || $HTTP_GET_VARS['view'] == 'previous' )
|
||||||
|
|
Loading…
Add table
Reference in a new issue