mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 08:47:45 +02:00
- fixing some bugs
- shortening some db columns to meet the requirements - correctly increase/decrease user post counts - fix the topic title length bug(s) git-svn-id: file:///svn/phpbb/trunk@6224 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -343,24 +343,13 @@ function change_poster(&$post_info, $userdata)
|
||||
}
|
||||
|
||||
// Adjust post counts
|
||||
$auth_user_from = new auth();
|
||||
$auth_user_from->acl($post_info);
|
||||
|
||||
$auth_user_to = new auth();
|
||||
$auth_user_to->acl($userdata);
|
||||
|
||||
// Decrease post count by one for the old user
|
||||
if ($auth_user_from->acl_get('f_postcount', $post_info['forum_id']))
|
||||
if ($post_info['post_postcount'])
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_posts = user_posts - 1
|
||||
WHERE user_id = ' . $post_info['user_id'];
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
// Increase post count by one for the new user
|
||||
if ($auth_user_to->acl_get('f_postcount', $post_info['forum_id']))
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_posts = user_posts + 1
|
||||
WHERE user_id = ' . $userdata['user_id'];
|
||||
|
Reference in New Issue
Block a user