mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-05 12:01:17 +01:00
C:/Program Files (x86)/Git/recent shows only the last 24 hours
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="account-username-box">
|
||||
<div class="account-username-box">
|
||||
<span class="account-username">
|
||||
<a href="/users/{userslug}">{username}</a>
|
||||
</span>
|
||||
|
||||
@@ -99,7 +99,11 @@ var RDB = require('./redis.js'),
|
||||
|
||||
// not the permanent location for this function
|
||||
Categories.getLatestTopics = function(current_user, start, end, callback) {
|
||||
RDB.zrevrange('topics:recent', 0, -1, function(err, tids) {
|
||||
|
||||
var args = [ 'topics:recent', '+inf', Date.now() - 86400000];
|
||||
|
||||
RDB.zrevrangebyscore(args, function(err, tids) {
|
||||
|
||||
var latestTopics = {
|
||||
'category_name' : 'Recent',
|
||||
'show_sidebar' : 'hidden',
|
||||
@@ -110,7 +114,7 @@ var RDB = require('./redis.js'),
|
||||
'topics' : []
|
||||
};
|
||||
|
||||
if (!tids.length) {
|
||||
if (!tids || !tids.length) {
|
||||
callback(latestTopics);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user