mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
update forum_ids for global announcements.
git-svn-id: file:///svn/phpbb/trunk@4700 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1857,6 +1857,12 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
|
||||
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - ' . ($row['topic_replies_real'] + 1);
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_real = forum_topics_real - 1' . (($row['topic_approved']) ? ', forum_topics = forum_topics - 1' : '');
|
||||
|
||||
// Update forum_ids for all posts
|
||||
$sql = 'UPDATE ' . POSTS_TABLE . '
|
||||
SET forum_id = 0
|
||||
WHERE topic_id = ' . $data['topic_id'];
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
// unglobalise
|
||||
else if ((int)$row['topic_type'] == POST_GLOBAL && $topic_type != POST_GLOBAL)
|
||||
@@ -1867,6 +1873,12 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
|
||||
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts + ' . ($row['topic_replies_real'] + 1);
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_real = forum_topics_real + 1' . (($row['topic_approved']) ? ', forum_topics = forum_topics + 1' : '');
|
||||
|
||||
// Update forum_ids for all posts
|
||||
$sql = 'UPDATE ' . POSTS_TABLE . '
|
||||
SET forum_id = ' . $data['forum_id'] . '
|
||||
WHERE topic_id = ' . $data['topic_id'];
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user