aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-11-30 18:03:09 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-11-30 18:03:09 +0000
commitb70b5198366b4db8c62e1a64573797b68990508e (patch)
tree8961c50115f21df36d4b91dd24edb3dbf5ffe920 /phpBB/posting.php
parent3f6e946889db7dd93ea176a2c60dcba7f78213c3 (diff)
downloadforums-b70b5198366b4db8c62e1a64573797b68990508e.tar
forums-b70b5198366b4db8c62e1a64573797b68990508e.tar.gz
forums-b70b5198366b4db8c62e1a64573797b68990508e.tar.bz2
forums-b70b5198366b4db8c62e1a64573797b68990508e.tar.xz
forums-b70b5198366b4db8c62e1a64573797b68990508e.zip
update forum_ids for global announcements.
git-svn-id: file:///svn/phpbb/trunk@4700 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index f19ff4fa7b..3d7685357d 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -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);
}
}