more linting

v1.18.x
psychobunny 10 years ago
parent 27496a08c4
commit f4b5090738

@ -79,7 +79,7 @@ var fs = require('fs'),
var msg = username + '(uid ' + uid + ') ' + string; var msg = username + '(uid ' + uid + ') ' + string;
events.log(msg); events.log(msg);
}); });
} };
events.log = function(msg, callback) { events.log = function(msg, callback) {
var logFile = path.join(nconf.get('base_dir'), logFileName); var logFile = path.join(nconf.get('base_dir'), logFileName);
@ -131,7 +131,7 @@ var fs = require('fs'),
} }
callback(null, {data: buffer, next: end - buffer.length}); callback(null, {data: buffer, next: end - buffer.length});
}) });
}); });
}; };

@ -1,3 +1,5 @@
"use strict";
var HotSwap = {}, var HotSwap = {},
winston = require('winston'), winston = require('winston'),
stack; stack;
@ -11,7 +13,6 @@ HotSwap.find = function(id) {
for(var x=0,numEntries=stack.length;x<numEntries;x++) { for(var x=0,numEntries=stack.length;x<numEntries;x++) {
if (stack[x].handle.hotswapId === id) { if (stack[x].handle.hotswapId === id) {
return x; return x;
break;
} }
} }
} else { } else {

@ -97,7 +97,7 @@ var db = require('./database'),
month: 2592000000, month: 2592000000,
threemonths: 7776000000 threemonths: 7776000000
}; };
since = terms[since] || terms['day']; since = terms[since] || terms.day;
var count = parseInt(meta.config.chatMessageInboxSize, 10) || 250; var count = parseInt(meta.config.chatMessageInboxSize, 10) || 250;
db.getSortedSetRevRangeByScore('messages:uid:' + uids[0] + ':to:' + uids[1], 0, count, Infinity, Date.now() - since, function(err, mids) { db.getSortedSetRevRangeByScore('messages:uid:' + uids[0] + ':to:' + uids[1], 0, count, Infinity, Date.now() - since, function(err, mids) {
if (err) { if (err) {
@ -341,7 +341,7 @@ var db = require('./database'),
} }
return (matrix[b.length][a.length] / b.length < 0.1); return (matrix[b.length][a.length] / b.length < 0.1);
}; }
Messaging.notifyUser = function(fromuid, touid, messageObj) { Messaging.notifyUser = function(fromuid, touid, messageObj) {
var queueObj = Messaging.notifyQueue[fromuid + ':' + touid]; var queueObj = Messaging.notifyQueue[fromuid + ':' + touid];

@ -1,4 +1,4 @@
"use strict";
var privileges = {}; var privileges = {};

@ -354,9 +354,11 @@ Upgrade.upgrade = function(callback) {
gid; gid;
for(var groupName in mapping) { for(var groupName in mapping) {
gid = mapping[groupName]; if (mapping.hasOwnProperty(groupName)) {
if (mapping.hasOwnProperty(groupName) && !reverseMapping.hasOwnProperty(gid)) { gid = mapping[groupName];
reverseMapping[parseInt(gid, 10)] = groupName; if (mapping.hasOwnProperty(groupName) && !reverseMapping.hasOwnProperty(gid)) {
reverseMapping[parseInt(gid, 10)] = groupName;
}
} }
} }

Loading…
Cancel
Save