1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-30 11:11:23 +02:00

Do not allow setting forums parent to the forum itself. (Bug #18855)

git-svn-id: file:///svn/phpbb/trunk@8871 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2008-09-18 13:22:15 +00:00
parent d135060c12
commit 76c0e5aa5e

View File

@ -921,10 +921,9 @@ 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);
// Set forum flags
// 1 = link tracking
// 2 = prune old polls
@ -1205,7 +1204,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))