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;
events.log(msg);
});
}
};
events.log = function(msg, callback) {
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});
})
});
});
};

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

@ -97,7 +97,7 @@ var db = require('./database'),
month: 2592000000,
threemonths: 7776000000
};
since = terms[since] || terms['day'];
since = terms[since] || terms.day;
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) {
if (err) {
@ -341,7 +341,7 @@ var db = require('./database'),
}
return (matrix[b.length][a.length] / b.length < 0.1);
};
}
Messaging.notifyUser = function(fromuid, touid, messageObj) {
var queueObj = Messaging.notifyQueue[fromuid + ':' + touid];

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

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

Loading…
Cancel
Save