mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 06:18:52 +00:00
Minor updates + change of function name in group auth to prevent conflict.
git-svn-id: file:///svn/phpbb/trunk@1712 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
8738aa7021
commit
fd62afbf4c
2 changed files with 26 additions and 26 deletions
|
@ -68,13 +68,13 @@ $field_names = array(
|
||||||
// ---------------
|
// ---------------
|
||||||
// Start Functions
|
// Start Functions
|
||||||
//
|
//
|
||||||
function a_auth_check_user($type, $key, $u_auth, $is_admin)
|
function a_auth_check_group($type, $key, $u_auth, $is_admin)
|
||||||
{
|
{
|
||||||
|
|
||||||
$single_user = 0;
|
$single_user = 0;
|
||||||
$auth_user = array();
|
$auth_user = array();
|
||||||
|
|
||||||
while( list($entry, $u_ary) = each($u_auth) )
|
while( list($entry, $u_ary) = @each($u_auth) )
|
||||||
{
|
{
|
||||||
if(!$single_user)
|
if(!$single_user)
|
||||||
{
|
{
|
||||||
|
@ -94,7 +94,7 @@ function a_auth_check_user($type, $key, $u_auth, $is_admin)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$auth_user['auth'] = (!$single_user) ? ( $auth_user || $result ) : $result;
|
$auth_user['auth'] = $auth_user || $result;
|
||||||
|
|
||||||
}
|
}
|
||||||
$auth_user['single_group'] = ($single_user) ? "single" : "group";
|
$auth_user['single_group'] = ($single_user) ? "single" : "group";
|
||||||
|
@ -430,7 +430,7 @@ if( isset($HTTP_POST_VARS['submit']) && ( !empty($HTTP_POST_VARS[POST_GROUPS_URL
|
||||||
//
|
//
|
||||||
// Checks complete, make updates to DB
|
// Checks complete, make updates to DB
|
||||||
//
|
//
|
||||||
while( list($chg_forum_id, $sql) = each($valid_auth_mod_sql) )
|
while( list($chg_forum_id, $sql) = @each($valid_auth_mod_sql) )
|
||||||
{
|
{
|
||||||
if( !empty($sql) )
|
if( !empty($sql) )
|
||||||
{
|
{
|
||||||
|
@ -441,7 +441,7 @@ if( isset($HTTP_POST_VARS['submit']) && ( !empty($HTTP_POST_VARS[POST_GROUPS_URL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while( list($chg_forum_id, $sql) = each($valid_auth_prv_sql) )
|
while( list($chg_forum_id, $sql) = @each($valid_auth_prv_sql) )
|
||||||
{
|
{
|
||||||
if( !empty($sql) )
|
if( !empty($sql) )
|
||||||
{
|
{
|
||||||
|
@ -456,7 +456,7 @@ if( isset($HTTP_POST_VARS['submit']) && ( !empty($HTTP_POST_VARS[POST_GROUPS_URL
|
||||||
// Any warnings?
|
// Any warnings?
|
||||||
//
|
//
|
||||||
$warning_list_mod = "";
|
$warning_list_mod = "";
|
||||||
while( list($forum_id, $user_ary) = each($warning_mod_userid) )
|
while( list($forum_id, $user_ary) = @each($warning_mod_userid) )
|
||||||
{
|
{
|
||||||
for($i = 0; $i < count($user_ary); $i++)
|
for($i = 0; $i < count($user_ary); $i++)
|
||||||
{
|
{
|
||||||
|
@ -469,7 +469,7 @@ if( isset($HTTP_POST_VARS['submit']) && ( !empty($HTTP_POST_VARS[POST_GROUPS_URL
|
||||||
}
|
}
|
||||||
|
|
||||||
$warning_list_acl = "";
|
$warning_list_acl = "";
|
||||||
while( list($forum_id, $user_ary) = each($warning_prv_userid) )
|
while( list($forum_id, $user_ary) = @each($warning_prv_userid) )
|
||||||
{
|
{
|
||||||
for($i = 0; $i < count($user_ary); $i++)
|
for($i = 0; $i < count($user_ary); $i++)
|
||||||
{
|
{
|
||||||
|
@ -596,7 +596,7 @@ else if( !empty($HTTP_POST_VARS[POST_GROUPS_URL]) || !empty($HTTP_GET_VARS[POST_
|
||||||
case AUTH_ACL:
|
case AUTH_ACL:
|
||||||
if($num_forum_access[$f_forum_id])
|
if($num_forum_access[$f_forum_id])
|
||||||
{
|
{
|
||||||
$result = a_auth_check_user(AUTH_ACL, $key, $g_access[$f_forum_id], 0);
|
$result = a_auth_check_group(AUTH_ACL, $key, $g_access[$f_forum_id], 0);
|
||||||
$auth_group[$f_forum_id][$key] = $result['auth'];
|
$auth_group[$f_forum_id][$key] = $result['auth'];
|
||||||
$auth_field_acl[$f_forum_id][$key] = $result['auth'];
|
$auth_field_acl[$f_forum_id][$key] = $result['auth'];
|
||||||
}
|
}
|
||||||
|
@ -609,7 +609,7 @@ else if( !empty($HTTP_POST_VARS[POST_GROUPS_URL]) || !empty($HTTP_GET_VARS[POST_
|
||||||
case AUTH_MOD:
|
case AUTH_MOD:
|
||||||
if($num_forum_access[$f_forum_id])
|
if($num_forum_access[$f_forum_id])
|
||||||
{
|
{
|
||||||
$result = a_auth_check_user(AUTH_MOD, $key, $g_access[$f_forum_id], 0);
|
$result = a_auth_check_group(AUTH_MOD, $key, $g_access[$f_forum_id], 0);
|
||||||
$auth_group[$f_forum_id][$key] = $result['auth'];
|
$auth_group[$f_forum_id][$key] = $result['auth'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -633,7 +633,7 @@ else if( !empty($HTTP_POST_VARS[POST_GROUPS_URL]) || !empty($HTTP_GET_VARS[POST_
|
||||||
//
|
//
|
||||||
if($num_forum_access[$f_forum_id])
|
if($num_forum_access[$f_forum_id])
|
||||||
{
|
{
|
||||||
$result = a_auth_check_user(AUTH_MOD, 'auth_mod', $g_access[$f_forum_id], 0);
|
$result = a_auth_check_group(AUTH_MOD, 'auth_mod', $g_access[$f_forum_id], 0);
|
||||||
$auth_group[$f_forum_id]['auth_mod'] = $result['auth'];
|
$auth_group[$f_forum_id]['auth_mod'] = $result['auth'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -104,7 +104,7 @@ function a_auth_check_user($type, $key, $u_auth, $is_admin)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$auth_user['auth'] = (!$single_user) ? ( $auth_user || $result ) : $result;
|
$auth_user['auth'] = $auth_user || $result;
|
||||||
|
|
||||||
}
|
}
|
||||||
$auth_user['single_group'] = ($single_user) ? "single" : "group";
|
$auth_user['single_group'] = ($single_user) ? "single" : "group";
|
||||||
|
@ -402,7 +402,7 @@ if( isset($HTTP_POST_VARS['submit']) && !empty($HTTP_POST_VARS[POST_USERS_URL])
|
||||||
// Step through all auth fields
|
// Step through all auth fields
|
||||||
//
|
//
|
||||||
@reset($new_prv_ary);
|
@reset($new_prv_ary);
|
||||||
while( list($this_prv_field, $new_prv_status) = each($new_prv_ary) )
|
while( list($this_prv_field, $new_prv_status) = @each($new_prv_ary) )
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Is this field set to ACL?
|
// Is this field set to ACL?
|
||||||
|
@ -469,7 +469,7 @@ if( isset($HTTP_POST_VARS['submit']) && !empty($HTTP_POST_VARS[POST_USERS_URL])
|
||||||
$all_zeroed = TRUE;
|
$all_zeroed = TRUE;
|
||||||
|
|
||||||
@reset($new_prv_ary);
|
@reset($new_prv_ary);
|
||||||
while( list($this_prv_field, $new_prv_status) = each($new_prv_ary) )
|
while( list($this_prv_field, $new_prv_status) = @each($new_prv_ary) )
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Is this field set to ACL?
|
// Is this field set to ACL?
|
||||||
|
@ -725,7 +725,7 @@ else if( isset($HTTP_POST_VARS['username']) || $user_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while(list($forumkey, $user_ary) = each($auth_user))
|
while( list($forumkey, $user_ary) = @each($auth_user) )
|
||||||
{
|
{
|
||||||
if( empty($adv) )
|
if( empty($adv) )
|
||||||
{
|
{
|
||||||
|
@ -766,7 +766,7 @@ else if( isset($HTTP_POST_VARS['username']) || $user_id)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@reset($forum_access);
|
@reset($forum_access);
|
||||||
while(list($key, $forum_row) = each($forum_access))
|
while( list($key, $forum_row) = @each($forum_access) )
|
||||||
{
|
{
|
||||||
$forum_id = $forum_row['forum_id'];
|
$forum_id = $forum_row['forum_id'];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue