From 20993d5cf1abdb448eb57c8b0de6c0f36bfc6f70 Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Fri, 25 May 2007 16:03:40 +0000 Subject: Introduced checks to stop negative postcounts (Bug #11561, #11421) Allow IP v4/v6 urls for remote avatars (Bug #11633) Delete avatar files automatically (Bug #11631) Automatically add selected columsn to group by statements in the converter (Bug #11465) git-svn-id: file:///svn/phpbb/trunk@7677 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/mcp/mcp_post.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/mcp') diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index 8dbbdba92e..7556f3270d 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -403,7 +403,8 @@ function change_poster(&$post_info, $userdata) { $sql = 'UPDATE ' . USERS_TABLE . ' SET user_posts = user_posts - 1 - WHERE user_id = ' . $post_info['user_id']; + WHERE user_id = ' . $post_info['user_id'] .' + AND user_posts > 0'; $db->sql_query($sql); $sql = 'UPDATE ' . USERS_TABLE . ' -- cgit v1.2.1