From c411c05060fdd5e91340ee112e80c5857be4f303 Mon Sep 17 00:00:00 2001 From: David M Date: Mon, 9 Apr 2007 19:44:25 +0000 Subject: [PATCH] #9551 git-svn-id: file:///svn/phpbb/trunk@7318 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_forums.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 3772b0a8e6..9330157ea0 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -1123,6 +1123,19 @@ class acp_forums $db->sql_query($sql); } } + else if ($row['forum_type'] == FORUM_CAT && $forum_data_sql['forum_type'] == FORUM_POST) + { + // Changing a category to a forum? Reset the data (you can't post directly in a cat, you must use a forum) + $forum_data_sql['forum_posts'] = 0; + $forum_data_sql['forum_topics'] = 0; + $forum_data_sql['forum_topics_real'] = 0; + $forum_data_sql['forum_last_post_id'] = 0; + $forum_data_sql['forum_last_post_subject'] = ''; + $forum_data_sql['forum_last_post_time'] = 0; + $forum_data_sql['forum_last_poster_id'] = 0; + $forum_data_sql['forum_last_poster_name'] = ''; + $forum_data_sql['forum_last_poster_colour'] = ''; + } if (sizeof($errors)) {