diff --git a/public/templates/account.tpl b/public/templates/account.tpl index bb471baa57..e6b98690bb 100644 --- a/public/templates/account.tpl +++ b/public/templates/account.tpl @@ -3,7 +3,7 @@ -
+
diff --git a/src/categories.js b/src/categories.js index ea4b4ec01d..64a1afac71 100644 --- a/src/categories.js +++ b/src/categories.js @@ -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; }