mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Updated for latest auth
git-svn-id: file:///svn/phpbb/trunk@399 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
b8758abd17
commit
99a804bb34
1 changed files with 12 additions and 7 deletions
|
@ -94,24 +94,29 @@ init_userprefs($userdata);
|
||||||
switch($mode)
|
switch($mode)
|
||||||
{
|
{
|
||||||
case 'newtopic':
|
case 'newtopic':
|
||||||
$auth_type = POST;
|
$auth_type = AUTH_POST;
|
||||||
|
$is_auth_type = "auth_post";
|
||||||
break;
|
break;
|
||||||
case 'reply':
|
case 'reply':
|
||||||
$auth_type = REPLY;
|
$auth_type = AUTH_REPLY;
|
||||||
|
$is_auth_type = "auth_replt";
|
||||||
break;
|
break;
|
||||||
case 'editpost':
|
case 'editpost':
|
||||||
$auth_type = EDIT;
|
$auth_type = AUTH_EDIT;
|
||||||
|
$is_auth_type = "auth_edit";
|
||||||
break;
|
break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
$auth_type = DELETE;
|
$auth_type = AUTH_DELETE;
|
||||||
|
$is_auth_type = "auth_delete";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$auth_type = POST;
|
$auth_type = AUTH_POST;
|
||||||
|
$is_auth_type = "auth_post";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$is_auth = auth($auth_type, $forum_id, $userdata);
|
$is_auth = auth($auth_type, $forum_id, $userdata);
|
||||||
if(!$is_auth)
|
if(!$is_auth[$is_auth_type])
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Ooopss, user is not authed
|
// Ooopss, user is not authed
|
||||||
|
@ -773,7 +778,7 @@ if($error)
|
||||||
error_die(GENERAL_ERROR, "Sorry, no there is no such forum");
|
error_die(GENERAL_ERROR, "Sorry, no there is no such forum");
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT forum_name, forum_access
|
$sql = "SELECT forum_name
|
||||||
FROM ".FORUMS_TABLE."
|
FROM ".FORUMS_TABLE."
|
||||||
WHERE forum_id = $forum_id";
|
WHERE forum_id = $forum_id";
|
||||||
if(!$result = $db->sql_query($sql))
|
if(!$result = $db->sql_query($sql))
|
||||||
|
|
Loading…
Add table
Reference in a new issue