diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-06-09 23:11:26 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-06-09 23:11:26 +0200 |
commit | 3d18d6dc77f090b8d6d4a7bc908d03f3ad719321 (patch) | |
tree | de813b43c41c06484875456b0e4e10420edf7ad2 /phpBB | |
parent | 790f7ded5b285ca46fc99cbc375501351cdda988 (diff) | |
download | forums-3d18d6dc77f090b8d6d4a7bc908d03f3ad719321.tar forums-3d18d6dc77f090b8d6d4a7bc908d03f3ad719321.tar.gz forums-3d18d6dc77f090b8d6d4a7bc908d03f3ad719321.tar.bz2 forums-3d18d6dc77f090b8d6d4a7bc908d03f3ad719321.tar.xz forums-3d18d6dc77f090b8d6d4a7bc908d03f3ad719321.zip |
[ticket/13823] Move the part of the query, so the update will get it correctly
PHPBB3-13823
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/acp/acp_prune.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php index c68f26fc13..e17399e3d9 100644 --- a/phpBB/includes/acp/acp_prune.php +++ b/phpBB/includes/acp/acp_prune.php @@ -506,9 +506,9 @@ class acp_prune WHERE ug.group_id = ' . (int) $group_id . ' AND ug.user_id <> ' . ANONYMOUS . ' AND u.user_type <> ' . USER_FOUNDER . ' - AND ug.user_pending = 0 ' . - (!empty($user_ids) ? ' AND ' . $db->sql_in_set('ug.user_id', $user_ids) : '') . ' - AND u.user_id = ug.user_id'; + AND ug.user_pending = 0 + AND u.user_id = ug.user_id + ' . (!empty($user_ids) ? ' AND ' . $db->sql_in_set('ug.user_id', $user_ids) : ''); $result = $db->sql_query($sql); // we're performing an intersection operation, so all the relevant users @@ -532,10 +532,10 @@ 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 u.user_id <> ' . ANONYMOUS . ' - AND u.user_type <> ' . USER_FOUNDER . - (!empty($user_ids) ? ' AND ' . $db->sql_in_set('p.poster_id', $user_ids) : '') . ' + AND u.user_type <> ' . USER_FOUNDER . ' AND ' . $db->sql_in_set('p.post_visibility', array(ITEM_UNAPPROVED, ITEM_REAPPROVE)) . ' AND u.user_id = p.poster_id + ' . (!empty($user_ids) ? ' AND ' . $db->sql_in_set('p.poster_id', $user_ids) : '') . ' GROUP BY p.poster_id HAVING queue_posts ' . $key_match[$queue_select] . ' ' . $posts_on_queue; $result = $db->sql_query($sql); |