fixing up moderator listing

v1.18.x
Julian Lam 12 years ago
parent 3cff31be4e
commit 9917f068f9

@ -40,6 +40,8 @@ var RDB = require('./redis.js'),
Categories.getModerators = function(cid, callback) {
RDB.smembers('cid:' + cid + ':moderators', function(err, mods) {
if (mods.length === 0) return callback([]);
user.getMultipleUserFields(mods, ['username'], function(details) {
var moderators = [];
for(u in details) {

@ -133,6 +133,7 @@ var RDB = require('./redis.js'),
'category_id': category_id || 0,
'topics': topics,
'active_users': active_users,
'moderator_block_class': moderators.length > 0 ? '' : 'none',
'moderators': moderators
});
}

Loading…
Cancel
Save