v1.18.x
barisusakli 9 years ago
parent ac09036156
commit 66c6c47b7c

@ -36,8 +36,10 @@ profileController.get = function(req, res, callback) {
} }
userData = _userData; userData = _userData;
if (req.uid !== parseInt(userData.uid, 10)) { req.session.uids_viewed = req.session.uids_viewed || {};
if (req.uid !== parseInt(userData.uid, 10) && (!req.session.uids_viewed[userData.uid] || req.session.uids_viewed[userData.uid] < Date.now() - 3600000)) {
user.incrementUserFieldBy(userData.uid, 'profileviews', 1); user.incrementUserFieldBy(userData.uid, 'profileviews', 1);
req.session.uids_viewed[userData.uid] = Date.now();
} }
async.parallel({ async.parallel({

Loading…
Cancel
Save