diff options
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 2 | ||||
-rw-r--r-- | phpBB/install/convertors/functions_phpbb20.php | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index b751103601..41fd061e75 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -232,6 +232,8 @@ p a { <li>[Fix] Ordered BBcode parsing functions in the same way everywhere where they are used</li> <li>[Fix] Prevent {URL} token in custom BBCodes from make_clickable messing (Bug #14151)</li> <li>[Sec] Added alternative tokens to custom BBCodes which are safe for CSS/Javascript and changed TEXT token to entitise opening and closing parantheses.</li> + <li>[Fix] Convert 2.0 moderator posting permissions (Bug #14105)</li> + </ul> </div> diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index ab1a1ede11..74ca47986e 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -587,7 +587,7 @@ function phpbb_convert_authentication($mode) $forum_access = array(); while ($row = $src_db->sql_fetchrow($result)) { - $forum_access[] = $row; + $forum_access[$row['forum_id']] = $row; } $src_db->sql_freeresult($result); @@ -967,6 +967,12 @@ function phpbb_convert_authentication($mode) { // And now the moderators // We make sure that they have at least standard access to the forums they moderate in addition to the moderating permissions + + $mod_post_map = array( + 'auth_announce' => 'f_announce', + 'auth_sticky' => 'f_sticky' + ); + foreach ($user_access as $forum_id => $access_map) { $forum_id = (int) $forum_id; @@ -977,6 +983,13 @@ function phpbb_convert_authentication($mode) { mass_auth('user_role', $forum_id, (int) phpbb_user_id($access['user_id']), 'MOD_STANDARD'); mass_auth('user_role', $forum_id, (int) phpbb_user_id($access['user_id']), 'FORUM_STANDARD'); + foreach ($mod_post_map as $old => $new) + { + if (isset($forum_access[$forum_id]) && isset($forum_access[$forum_id][$old]) && $forum_access[$forum_id][$old] == AUTH_MOD) + { + mass_auth('user', $forum_id, (int) phpbb_user_id($access['user_id']), $new, ACL_YES); + } + } } } } @@ -991,6 +1004,13 @@ function phpbb_convert_authentication($mode) { mass_auth('group_role', $forum_id, (int) $access['group_id'], 'MOD_STANDARD'); mass_auth('group_role', $forum_id, (int) $access['group_id'], 'FORUM_STANDARD'); + foreach ($mod_post_map as $old => $new) + { + if (isset($forum_access[$forum_id]) && isset($forum_access[$forum_id][$old]) && $forum_access[$forum_id][$old] == AUTH_MOD) + { + mass_auth('group', $forum_id, (int) $access['group_id'], $new, ACL_YES); + } + } } } } |