From 80254760d1aeb57d36a68039621b3998b83deaef Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 18 Sep 2008 13:21:16 +0000 Subject: Do not allow setting forums parent to the forum itself. (Bug #18855) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8870 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_forums.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/acp/acp_forums.php') 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)) -- cgit v1.2.1