aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2019-08-05 20:12:10 +0700
committerrxu <rxu@mail.ru>2019-08-05 20:12:10 +0700
commit8339269919e29dd91c8525bdb3a91c4fea92dbab (patch)
tree680bb0c6cdfc721a8d42f46951709b639fb0fc94
parent5307da11b63a953ce37c32d6bffe74f35a303a97 (diff)
downloadforums-8339269919e29dd91c8525bdb3a91c4fea92dbab.tar
forums-8339269919e29dd91c8525bdb3a91c4fea92dbab.tar.gz
forums-8339269919e29dd91c8525bdb3a91c4fea92dbab.tar.bz2
forums-8339269919e29dd91c8525bdb3a91c4fea92dbab.tar.xz
forums-8339269919e29dd91c8525bdb3a91c4fea92dbab.zip
[ticket/16124] Fix users search by last visit time in memberlist.php
PHPBB3-16124
-rw-r--r--phpBB/memberlist.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 8f4d54b2c7..810af113b0 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1073,7 +1073,18 @@ switch ($mode)
if ($active_time !== false)
{
- $sql_where .= " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . $active_time;
+ if ((int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)
+ {
+ $sql_where .= ' AND u.user_lastvisit = 0';
+ }
+ else if ($active_select != 'lt')
+ {
+ $sql_where .= ' AND u.user_lastvisit ' . $find_key_match[$active_select] . ' ' . $active_time;
+ }
+ else
+ {
+ $sql_where .= ' AND (u.user_lastvisit > 0 AND u.user_lastvisit < ' . $active_time . ')';
+ }
}
}