aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/memberlist.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-08-11 20:37:42 +0200
committerMarc Alexander <admin@m-a-styles.de>2019-08-11 20:37:42 +0200
commitb8f76a933016fbe2fa9496b74e244043e1ed21db (patch)
treecd2e2460075d9f9378fc57bb894487005ce95a40 /phpBB/memberlist.php
parent38e5913338374367d8ac14d6d08c85b7aaa58f27 (diff)
parente8dcf27ee3f0c792ecc71c7375d553f7557cafd8 (diff)
downloadforums-b8f76a933016fbe2fa9496b74e244043e1ed21db.tar
forums-b8f76a933016fbe2fa9496b74e244043e1ed21db.tar.gz
forums-b8f76a933016fbe2fa9496b74e244043e1ed21db.tar.bz2
forums-b8f76a933016fbe2fa9496b74e244043e1ed21db.tar.xz
forums-b8f76a933016fbe2fa9496b74e244043e1ed21db.zip
Merge pull request #5645 from rxu/ticket/16124
[ticket/16124] Fix users search by last visit time in memberlist.php
Diffstat (limited to 'phpBB/memberlist.php')
-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..ce7159c150 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 ($active_select === 'lt' && (int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)
+ {
+ $sql_where .= ' AND u.user_lastvisit = 0';
+ }
+ else if ($active_select === 'gt')
+ {
+ $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 . ')';
+ }
}
}