aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_forums.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp/acp_forums.php')
-rw-r--r--phpBB/includes/acp/acp_forums.php13
1 files changed, 13 insertions, 0 deletions
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))
{