fix: time cutoff and lang string

v1.18.x
Barış Soner Uşaklı 5 years ago
parent 44cd71895b
commit 5b8550f060

@ -2,7 +2,7 @@
"forum-traffic": "Forum Traffic",
"page-views": "Page Views",
"unique-visitors": "Unique Visitors",
"users": "Users",
"new-users": "New Users",
"posts": "Posts",
"topics": "Topics",
"page-views-seven": "Last 7 Days",

@ -159,7 +159,7 @@ usersController.getUsers = async function (set, uid, query) {
usersController.getUsersAndCount = async function (set, uid, start, stop) {
async function getCount() {
if (set === 'users:online') {
return await db.sortedSetCount('users:online', Date.now() - 300000, '+inf');
return await db.sortedSetCount('users:online', Date.now() - (meta.config.onlineCutoff * 60000), '+inf');
} else if (set === 'users:banned' || set === 'users:flags') {
return await db.sortedSetCard(set);
}

Loading…
Cancel
Save