diff options
author | Ruslan Uzdenov <rxu@mail.ru> | 2009-07-14 12:02:11 +0000 |
---|---|---|
committer | Ruslan Uzdenov <rxu@mail.ru> | 2009-07-14 12:02:11 +0000 |
commit | 5cbf5d4b16a41ea2599cb7f56836d5b963ab4000 (patch) | |
tree | d424b198fabe79e44d73608cc5b814fc21d549c7 | |
parent | ecfe24528c46b264baa164ba5811fcc5cfab231e (diff) | |
download | forums-5cbf5d4b16a41ea2599cb7f56836d5b963ab4000.tar forums-5cbf5d4b16a41ea2599cb7f56836d5b963ab4000.tar.gz forums-5cbf5d4b16a41ea2599cb7f56836d5b963ab4000.tar.bz2 forums-5cbf5d4b16a41ea2599cb7f56836d5b963ab4000.tar.xz forums-5cbf5d4b16a41ea2599cb7f56836d5b963ab4000.zip |
Fix bug #44295 - Cannot prune users who never logged in
Authorised by: AcydBurn
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9754 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_prune.php | 7 | ||||
-rw-r--r-- | phpBB/language/en/acp/prune.php | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index a1b649f2be..8334214de2 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -152,6 +152,7 @@ <li>[Fix] Correctly detect GZIP status in debug mode. (Bug #24075 - Patch by rxu)</li> <li>[Fix] Posting smilies in view more smilies now work again in IE (Bug #46025 - Patch by leviatan21)</li> <li>[Fix] Properly convert and show filesize information (Bug #47775 - Patch by bantu)</li> + <li>[Fix] Add ability to prune users who never logged in. (Bug #44295 - Patch by rxu)</li> <li>[Fix] Smilies and images not viewed in topic-print view (Bug #47265 - Patch by nickvergessen)</li> <li>[Fix] Force full date for PMs print-view (Patch by nickvergessen)</li> <li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li> diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php index a82a438db7..7eeb37133f 100644 --- a/phpBB/includes/acp/acp_prune.php +++ b/phpBB/includes/acp/acp_prune.php @@ -406,7 +406,12 @@ class acp_prune $where_sql .= (sizeof($joined)) ? " AND user_regdate " . $key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, (int) $joined[1], (int) $joined[2], (int) $joined[0]) : ''; $where_sql .= ($count !== '') ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : ''; - if (sizeof($active) && $active_select != 'lt') + // 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) + { + $where_sql .= ' AND user_lastvisit = 0'; + } + else if (sizeof($active) && $active_select != 'lt') { $where_sql .= ' AND user_lastvisit ' . $key_match[$active_select] . ' ' . gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]); } diff --git a/phpBB/language/en/acp/prune.php b/phpBB/language/en/acp/prune.php index 2f4a9b4984..5e313d20e2 100644 --- a/phpBB/language/en/acp/prune.php +++ b/phpBB/language/en/acp/prune.php @@ -47,7 +47,7 @@ $lang = array_merge($lang, array( 'JOINED_EXPLAIN' => 'Enter a date in <kbd>YYYY-MM-DD</kbd> format.', - 'LAST_ACTIVE_EXPLAIN' => 'Enter a date in <kbd>YYYY-MM-DD</kbd> format.', + 'LAST_ACTIVE_EXPLAIN' => 'Enter a date in <kbd>YYYY-MM-DD</kbd> format. Enter <kbd>0000-00-00</kbd> to prune users who never logged in, <em>Before</em> and <em>After</em> conditions will be ignored.', 'PRUNE_USERS_LIST' => 'Users to be pruned', 'PRUNE_USERS_LIST_DELETE' => 'With the selected critera for pruning users the following accounts will be removed.', |