mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/11507] Fix the unapproved posts count query.
Only unapproved posts should be counted. PHPBB3-11507
This commit is contained in:
parent
b41e2d335a
commit
c5656747d8
1 changed files with 2 additions and 1 deletions
|
@ -516,10 +516,11 @@ class acp_prune
|
|||
$sql = 'SELECT u.user_id, u.username, COUNT(p.post_id) AS queue_posts
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE ' . $db->sql_in_set('p.poster_id', $user_ids, false, true) . '
|
||||
AND p.post_visibility = ' . ITEM_UNAPPROVED . '
|
||||
AND u.user_id = p.poster_id
|
||||
GROUP BY p.poster_id
|
||||
HAVING queue_posts ' . $key_match[$queue_select] . ' ' . $posts_on_queue;
|
||||
$result = $db->sql_query($result);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
// same intersection logic as the above group ID portion
|
||||
$user_ids = $usernames = array();
|
||||
|
|
Loading…
Add table
Reference in a new issue