diff options
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_forums.php | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 0d45c5f5ca..a2eae1961f 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -113,6 +113,7 @@ <li>[Fix] Expand shown ban reason in unban screen to fully show long entries. (Bug #16234)</li> <li>[Fix] Preserve alpha transparency for created thumbnails. (Bug #16575)</li> <li>[Fix] Use correct port delimiter for MSSQL connections in windows. (Bug #16615)</li> + <li>[Fix] Do not allow setting forums parent to the forum itself. (Bug #18855)</li> <li>[Change] No longer allow the direct use of MULTI_INSERT in sql_build_array. sql_multi_insert() must be used.</li> <li>[Change] Display warning in ACP if config.php file is left writable.</li> diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index fa07c00dee..5b4d0939d4 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -922,9 +922,8 @@ class acp_forums $range_test_ary = array( array('lang' => 'FORUM_TOPICS_PAGE', 'value' => $forum_data['forum_topics_per_page'], 'column_type' => 'TINT:0'), ); - validate_range($range_test_ary, $errors); - + validate_range($range_test_ary, $errors); // Set forum flags // 1 = link tracking @@ -1206,7 +1205,14 @@ class acp_forums if ($row['parent_id'] != $forum_data_sql['parent_id']) { - $errors = $this->move_forum($forum_data_sql['forum_id'], $forum_data_sql['parent_id']); + if ($row['forum_id'] != $forum_data_sql['parent_id']) + { + $errors = $this->move_forum($forum_data_sql['forum_id'], $forum_data_sql['parent_id']); + } + else + { + $forum_data_sql['parent_id'] = $row['parent_id']; + } } if (sizeof($errors)) |