1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-09-01 20:33:16 +02:00

Added the redirect() function for nice and clean redirection.

git-svn-id: file:///svn/phpbb/trunk@2948 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Ludovic Arnaud
2002-10-09 19:50:48 +00:00
parent ac4b54ff4d
commit 369189806b
6 changed files with 44 additions and 62 deletions

View File

@@ -76,10 +76,7 @@ if (!$auth->acl_get('f_read', $forum_id))
{
if ( !$userdata['user_id'] )
{
$redirect = "f=$forum_id" . ( ( isset($start) ) ? "&start=$start" : '' );
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . "login.$phpEx$SID&redirect=viewforum.$phpEx&$redirect");
exit;
redirect("login.$phpEx$SID&redirect=viewforum.$phpEx&f=$forum_id" . ((isset($start)) ? "&start=$start" : ''));
}
// The user is not authed to read this forum ...
@@ -87,7 +84,7 @@ if (!$auth->acl_get('f_read', $forum_id))
}
// End of auth check
// Build subforum if applicable
// Build subforums list if applicable
$type = 'parent';
$forum_rows = array();