fixed anon images in topic view, anon users arent added to active users for a category

v1.18.x
Baris Usakli 12 years ago
parent c8ec095d99
commit f946918176

@ -425,7 +425,8 @@ var RDB = require('./redis.js'),
};
Categories.addActiveUser = function(cid, uid) {
RDB.sadd('cid:' + cid + ':active_users', uid);
if(parseInt(uid, 10))
RDB.sadd('cid:' + cid + ':active_users', uid);
};
Categories.removeActiveUser = function(cid, uid) {

@ -336,7 +336,7 @@ var RDB = require('./redis.js'),
topicData.badgeclass = (topicInfo.hasread && current_user != 0) ? '' : 'badge-important';
topicData.teaser_text = topicInfo.teaserInfo.text || '',
topicData.teaser_username = topicInfo.teaserInfo.username || '';
topicData.teaser_userpicture = topicInfo.teaserInfo.picture || '';
topicData.teaser_userpicture = topicInfo.teaserInfo.picture || require('gravatar').url('', {}, https = nconf.get('https'));
topicData.teaser_pid = topicInfo.teaserInfo.pid;
topicData.teaser_timestamp = topicInfo.teaserInfo.timestamp ? (new Date(parseInt(topicInfo.teaserInfo.timestamp, 10)).toISOString()) : '';

Loading…
Cancel
Save