aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCesar G <prototech91@gmail.com>2014-12-09 18:27:04 -0800
committerCesar G <prototech91@gmail.com>2014-12-09 18:27:04 -0800
commit75780d7fc88590de4380f426d87cf21c9e32371b (patch)
treebb2d5b5b80e0a74a06f92e8823b787fd4d7a12d5
parent61df1ac2b394d8bc9c28a2f8e16672cb9221b63e (diff)
downloadforums-75780d7fc88590de4380f426d87cf21c9e32371b.tar
forums-75780d7fc88590de4380f426d87cf21c9e32371b.tar.gz
forums-75780d7fc88590de4380f426d87cf21c9e32371b.tar.bz2
forums-75780d7fc88590de4380f426d87cf21c9e32371b.tar.xz
forums-75780d7fc88590de4380f426d87cf21c9e32371b.zip
[ticket/13420] Correctly filter by lt/gt/equal to 0 posts when pruning users.
PHPBB3-13420
-rw-r--r--phpBB/includes/acp/acp_prune.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index a10b248324..59f15c4890 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -397,7 +397,7 @@ class acp_prune
$joined_after = request_var('joined_after', '');
$active = request_var('active', '');
- $count = request_var('count', 0);
+ $count = ($request->variable('count', '') === '') ? false : $request->variable('count', 0);
$active = ($active) ? explode('-', $active) : array();
$joined_before = ($joined_before) ? explode('-', $joined_before) : array();
@@ -439,7 +439,7 @@ class acp_prune
$where_sql .= ($username) ? ' AND username_clean ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), utf8_clean_string($username))) : '';
$where_sql .= ($email) ? ' AND user_email ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), $email)) . ' ' : '';
$where_sql .= $joined_sql;
- $where_sql .= ($count) ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : '';
+ $where_sql .= ($count !== false) ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : '';
// First handle pruning of users who never logged in, last active date is 0000-00-00
if (sizeof($active) && (int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)