diff options
author | David M <davidmj@users.sourceforge.net> | 2007-04-30 16:18:59 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2007-04-30 16:18:59 +0000 |
commit | ab9586a7f388aa82b567a677224c52fc9258cb0b (patch) | |
tree | a669095e93560fbf04b0cde4339a34fe177ce51c /phpBB/includes/functions_posting.php | |
parent | 5538a812eb064bdc1cb6d71031958033fa1dc0be (diff) | |
download | forums-ab9586a7f388aa82b567a677224c52fc9258cb0b.tar forums-ab9586a7f388aa82b567a677224c52fc9258cb0b.tar.gz forums-ab9586a7f388aa82b567a677224c52fc9258cb0b.tar.bz2 forums-ab9586a7f388aa82b567a677224c52fc9258cb0b.tar.xz forums-ab9586a7f388aa82b567a677224c52fc9258cb0b.zip |
#10295
git-svn-id: file:///svn/phpbb/trunk@7441 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 4b7d8ff8c0..333dac8b56 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1534,6 +1534,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u break; } + $post_approved = $sql_data[POSTS_TABLE]['sql']['post_approved']; + // And the topic ladies and gentlemen switch ($post_mode) { @@ -1879,14 +1881,22 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u { if ($topic_type != POST_GLOBAL) { - $update_sql = update_post_information('forum', $data['forum_id'], true, $data['post_id']); + if ($post_approved) + { + $update_sql = update_post_information('forum', $data['forum_id'], true, $data['post_id']); + } + if (sizeof($update_sql)) { $sql_data[FORUMS_TABLE]['stat'][] = implode(', ', $update_sql[$data['forum_id']]); } } - $update_sql = update_post_information('topic', $data['topic_id'], true, $data['post_id']); + if ($post_approved) + { + $update_sql = update_post_information('topic', $data['topic_id'], true, $data['post_id']); + } + if (sizeof($update_sql)) { $sql_data[TOPICS_TABLE]['stat'][] = implode(', ', $update_sql[$data['topic_id']]); |