refactors to sitemap, closed #2254

v1.18.x
Julian Lam 10 years ago
parent 9b0ba6c7a4
commit dfbac595b6

@ -54,16 +54,18 @@ var path = require('path'),
topicUrls: function(next) {
var topicUrls = [];
db.getSortedSetRevRange('topics:recent', 0, 49, function(err, tids) {
if (err) {
return next(err);
}
privileges.topics.filter('read', tids, 0, function(err, tids) {
if (err) {
return next(err);
async.waterfall([
async.apply(db.getSortedSetRevRange, 'topics:recent', 0, -1),
function(tids, next) {
db.getSortedSetRevRange('topics:recent', 0, -1, next);
},
function(tids, next) {
privileges.topics.filter('read', tids, 0, next);
},
function(tids, next) {
topics.getTopicsFields(tids, ['tid', 'title', 'lastposttime'], next);
}
topics.getTopicsFields(tids, ['tid', 'title', 'lastposttime'], function(err, topics) {
], function(err, topics) {
if (err) {
return next(err);
}
@ -81,8 +83,6 @@ var path = require('path'),
next(null, topicUrls);
});
});
});
}
}, function(err, data) {
if (!err) {

Loading…
Cancel
Save