mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 17:05:51 +01:00
more linting
This commit is contained in:
@@ -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,11 +354,13 @@ Upgrade.upgrade = function(callback) {
|
|||||||
gid;
|
gid;
|
||||||
|
|
||||||
for(var groupName in mapping) {
|
for(var groupName in mapping) {
|
||||||
|
if (mapping.hasOwnProperty(groupName)) {
|
||||||
gid = mapping[groupName];
|
gid = mapping[groupName];
|
||||||
if (mapping.hasOwnProperty(groupName) && !reverseMapping.hasOwnProperty(gid)) {
|
if (mapping.hasOwnProperty(groupName) && !reverseMapping.hasOwnProperty(gid)) {
|
||||||
reverseMapping[parseInt(gid, 10)] = groupName;
|
reverseMapping[parseInt(gid, 10)] = groupName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async.eachSeries(names, function(name, next) {
|
async.eachSeries(names, function(name, next) {
|
||||||
async.series([
|
async.series([
|
||||||
|
|||||||
Reference in New Issue
Block a user