mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Two fixes for the group permissions ACP...
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@8370 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
31ce16ad2e
commit
72fbf492ca
2 changed files with 43 additions and 6 deletions
|
@ -231,11 +231,46 @@ if ( isset($HTTP_POST_VARS['submit']) && ( ( $mode == 'user' && $user_id ) || (
|
|||
else
|
||||
{
|
||||
|
||||
$change_mod_list = ( isset($HTTP_POST_VARS['moderator']) ) ? $HTTP_POST_VARS['moderator'] : false;
|
||||
$change_mod_list = ( isset($HTTP_POST_VARS['moderator']) ) ? $HTTP_POST_VARS['moderator'] : array();
|
||||
|
||||
if ( empty($adv) )
|
||||
{
|
||||
$change_acl_list = ( isset($HTTP_POST_VARS['private']) ) ? $HTTP_POST_VARS['private'] : false;
|
||||
$sql = "SELECT f.*
|
||||
FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c
|
||||
WHERE f.cat_id = c.cat_id
|
||||
ORDER BY c.cat_order, f.forum_order ASC";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't obtain forum information", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$forum_access = $forum_auth_level_fields = array();
|
||||
while( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
$forum_access[] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
for($i = 0; $i < count($forum_access); $i++)
|
||||
{
|
||||
$forum_id = $forum_access[$i]['forum_id'];
|
||||
|
||||
for($j = 0; $j < count($forum_auth_fields); $j++)
|
||||
{
|
||||
$forum_auth_level_fields[$forum_id][$forum_auth_fields[$j]] = $forum_access[$i][$forum_auth_fields[$j]] == AUTH_ACL;
|
||||
}
|
||||
}
|
||||
|
||||
while( list($forum_id, $value) = @each($_POST['private']) )
|
||||
{
|
||||
while( list($auth_field, $exists) = @each($forum_auth_level_fields[$forum_id]) )
|
||||
{
|
||||
if ($exists)
|
||||
{
|
||||
$change_acl_list[$forum_id][$auth_field] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -289,11 +324,11 @@ if ( isset($HTTP_POST_VARS['submit']) && ( ( $mode == 'user' && $user_id ) || (
|
|||
$forum_id = $forum_access[$i]['forum_id'];
|
||||
|
||||
if (
|
||||
( isset($auth_access[$forum_id]['auth_mod']) && $change_mod_list[$forum_id]['auth_mod'] != $auth_access[$forum_id]['auth_mod'] ) ||
|
||||
( !isset($auth_access[$forum_id]['auth_mod']) && !empty($change_mod_list[$forum_id]['auth_mod']) )
|
||||
( isset($auth_access[$forum_id]['auth_mod']) && $change_mod_list[$forum_id] != $auth_access[$forum_id]['auth_mod'] ) ||
|
||||
( !isset($auth_access[$forum_id]['auth_mod']) && !empty($change_mod_list[$forum_id]) )
|
||||
)
|
||||
{
|
||||
$update_mod_status[$forum_id] = $change_mod_list[$forum_id]['auth_mod'];
|
||||
$update_mod_status[$forum_id] = $change_mod_list[$forum_id];
|
||||
|
||||
if ( !$update_mod_status[$forum_id] )
|
||||
{
|
||||
|
|
|
@ -80,6 +80,8 @@ p,ul,td {font-size:10pt;}
|
|||
<li>[Fix] Fixed spelling error(s) in lang_admin.php (Bug #7172, #6978)</li>
|
||||
<li>[Fix] Correctly display censored words in admin panel (Bug #12271)</li>
|
||||
<li>[Fix] Do not allow soft hyphen \xAD in usernames (reported by Bander00)</li>
|
||||
<li>[Fix] Fixed the group permission system's use of array access</li>
|
||||
<li>[Fix] Simple group permissions now work properly</li>
|
||||
</ul>
|
||||
|
||||
<a name="2021"></a><h3 class="h3">l.ii. Changes since 2.0.21</h3>
|
||||
|
|
Loading…
Add table
Reference in a new issue