aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorCesar G <prototech91@gmail.com>2013-11-27 20:51:16 -0800
committerCesar G <prototech91@gmail.com>2013-11-27 21:26:22 -0800
commitc5656747d8e4e6838f9549000642886df6014755 (patch)
tree3ac59145c99b1f129b65ae2ef8bb5df5744d6284 /phpBB/includes
parentb41e2d335a8783da0ac60b521f6d1c82fb14e954 (diff)
downloadforums-c5656747d8e4e6838f9549000642886df6014755.tar
forums-c5656747d8e4e6838f9549000642886df6014755.tar.gz
forums-c5656747d8e4e6838f9549000642886df6014755.tar.bz2
forums-c5656747d8e4e6838f9549000642886df6014755.tar.xz
forums-c5656747d8e4e6838f9549000642886df6014755.zip
[ticket/11507] Fix the unapproved posts count query.
Only unapproved posts should be counted. PHPBB3-11507
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_prune.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index 5514cb2b9a..5d8d0a9dbc 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -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();