C:/Program Files (x86)/Git/recent shows only the last 24 hours

This commit is contained in:
Baris Soner Usakli
2013-07-26 14:48:16 -04:00
parent 557c6effdd
commit 3f8b3894d8
2 changed files with 7 additions and 3 deletions

View File

@@ -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>

View File

@@ -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;
}