mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-16 06:36:39 +02:00
Fixed updating of user post count on deletion
git-svn-id: file:///svn/phpbb/trunk@2203 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@ -484,6 +484,14 @@ function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Error in deleting post", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_posts = user_posts - 1
|
||||
WHERE user_id = " . $post_data['poster_id'];
|
||||
if ( !($db->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Error in deleting post", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
|
||||
if( $mode == "poll_delete" || ( $mode == "delete" && $post_data['first_post'] && $post_data['last_post'] ) && $post_data['has_poll'] && $post_data['edit_poll'] )
|
||||
|
Reference in New Issue
Block a user