diff options
Diffstat (limited to 'phpBB/includes/acp/acp_forums.php')
| -rw-r--r-- | phpBB/includes/acp/acp_forums.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 0f38d6663b..3e5ca705da 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -1710,8 +1710,14 @@ class acp_forums foreach ($post_counts as $poster_id => $substract) { $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_posts = 0 + WHERE user_id = ' . $poster_id . ' + AND user_posts < ' . $substract; + $db->sql_query($sql); + $sql = 'UPDATE ' . USERS_TABLE . ' SET user_posts = user_posts - ' . $substract . ' - WHERE user_id = ' . $poster_id; + WHERE user_id = ' . $poster_id . ' + AND user_posts >= ' . $substract; $db->sql_query($sql); } } |
