From 46c9da77a47abba5f0bb314d9a4cd68d1abb32c9 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Tue, 2 Jan 2007 16:35:48 +0000 Subject: - do not allow setting the parent to currently assigned childs [Bug #6708] - Allow the display_on_index setting to be specified for link forums [Bug #6660] - Rank code in functions_display.php [Bug #6656] - Added some new locations for the viewonline page [Related to bug #6484] - Do not display attached images inline if user disabled image display in posts; the same with flash files [Bug #6226] git-svn-id: file:///svn/phpbb/trunk@6829 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_forums.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 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 fe78a6252b..da60162e33 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -133,6 +133,12 @@ class acp_forums 'forum_password_confirm'=> request_var('forum_password_confirm', ''), ); + // Use link_display_on_index setting if forum type is link + if ($forum_data['forum_type'] == FORUM_LINK) + { + $forum_data['display_on_index'] = request_var('link_display_on_index', false); + } + $forum_data['show_active'] = ($forum_data['forum_type'] == FORUM_POST) ? request_var('display_recent', false) : request_var('display_active', false); // Get data for forum rules if specified... @@ -396,18 +402,14 @@ class acp_forums $forum_data['right_id'] = $row['right_id']; } - // Make sure there is no forum displayed for parents_list having the current forum id as a parent... - $sql = 'SELECT forum_id - FROM ' . FORUMS_TABLE . ' - WHERE parent_id = ' . $forum_id; - $result = $db->sql_query($sql); + // Make sure no direct child forums are able to be selected as parents. + $childs = get_forum_branch($forum_id, 'children'); - $exclude_forums = array($forum_id); - while ($row = $db->sql_fetchrow($result)) + $exclude_forums = array(); + foreach ($childs as $row) { $exclude_forums[] = $row['forum_id']; } - $db->sql_freeresult($result); $parents_list = make_forum_select($forum_data['parent_id'], $exclude_forums, false, false, false); -- cgit v1.2.1