omg I don't know what I am doing

v1.18.x
Julian Lam 11 years ago
parent 8f879cd3eb
commit a078f73e84

@ -353,14 +353,25 @@ var async = require('async'),
return parseInt(read[index], 10) === 0;
});
unreadTids.push.apply(unreadTids, newtids);
// Filter out topics that belong to categories that this user cannot access
async.filter(newtids, function(tid, next) {
threadTools.privileges(tid, uid, function(err, privileges) {
if (!err && privileges.read) {
next(true);
} else {
next(false);
}
});
}, function(newtids) {
unreadTids.push.apply(unreadTids, newtids);
if(continueCondition()) {
start = stop + 1;
stop = start + 19;
}
if(continueCondition()) {
start = stop + 1;
stop = start + 19;
}
callback(null);
callback(null);
});
});
}
});

Loading…
Cancel
Save