mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
git-svn-id: file:///svn/phpbb/trunk@7936 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
1687d63199
commit
9242d6f998
2 changed files with 6 additions and 5 deletions
|
@ -271,6 +271,7 @@ p a {
|
||||||
<li>[Fix] Do not erase ranks and avatars when changing default groups (Bugs #13701, #13697)</li>
|
<li>[Fix] Do not erase ranks and avatars when changing default groups (Bugs #13701, #13697)</li>
|
||||||
<li>[Fix] Limit author searches to firstpost, if selected (Bug #13579)</li>
|
<li>[Fix] Limit author searches to firstpost, if selected (Bug #13579)</li>
|
||||||
<li>[Fix] store Date custom profile field defaults on multi-lingual boards </li>
|
<li>[Fix] store Date custom profile field defaults on multi-lingual boards </li>
|
||||||
|
<li>[Fix] Properly resync user post counts for users that have no posts (Bug #13581)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -161,15 +161,15 @@ class acp_main
|
||||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
|
$sql = 'SELECT COUNT(p.post_id) AS num_posts, u.user_id
|
||||||
FROM ' . POSTS_TABLE . '
|
FROM ' . USERS_TABLE . ' u
|
||||||
WHERE post_postcount = 1
|
LEFT JOIN ' . POSTS_TABLE . ' p ON (u.user_id = p.poster_id AND p.post_postcount = 1)
|
||||||
GROUP BY poster_id';
|
GROUP BY u.user_id';
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['poster_id']}");
|
$db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['user_id']}");
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue