From 69a854d3ee4202b0118942ed7b64ef26fc172dba Mon Sep 17 00:00:00 2001 From: Ludovic Arnaud Date: Fri, 28 Mar 2003 01:25:03 +0000 Subject: forum_parents made more reliable. Removed the $extra_form_fields parameter from jumpbox routines. git-svn-id: file:///svn/phpbb/trunk@3739 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_posting.php | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 12c85a1e16..168bd440f7 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -297,6 +297,7 @@ function update_last_post_information($type, $id) { case 'forum': $sql_select_add = ', f.forum_parents'; +// $sql_select_add = ', f.left_id'; $sql_table_add = ', ' . FORUMS_TABLE . ' f'; $sql_where_add = 'AND (t.forum_id = f.forum_id) AND (f.forum_id = ' . $id . ')'; $sql_update_table = FORUMS_TABLE; @@ -330,16 +331,13 @@ function update_last_post_information($type, $id) case 'forum': // Update forums: last post info, topics, posts ... we need to update // each parent too ... + $forum_ids = $id; - $forum_parents = trim($row['forum_parents']); + $forum_parents = get_forum_parents($row); - if ($forum_parents != '') + foreach ($forum_parents as $parent_forum_id => $parent_name) { - $forum_parents = unserialize($forum_parents); - foreach ($forum_parents as $parent_forum_id => $parent_name) - { - $forum_ids .= ', ' . $parent_forum_id; - } + $forum_ids .= ', ' . $parent_forum_id; } $where_clause = 'forum_id IN (' . $forum_ids . ')'; @@ -815,13 +813,10 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_ // Update forums: last post info, topics, posts ... we need to update // each parent too ... $forum_ids = $post_data['forum_id']; - if (!empty($post_data['forum_parents'])) + $forum_parents = get_forum_parents($post_data); + foreach ($forum_parents as $parent_forum_id => $parent_name) { - $post_data['forum_parents'] = unserialize($post_data['forum_parents']); - foreach ($post_data['forum_parents'] as $parent_forum_id => $parent_name) - { - $forum_ids .= ', ' . $parent_forum_id; - } + $forum_ids .= ', ' . $parent_forum_id; } $forum_topics_sql = ($mode == 'post') ? ', forum_topics = forum_topics + 1' : ''; -- cgit v1.2.1