mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-08-26 19:07:17 +02:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var async = require('async');
|
||||
var winston = require('winston');
|
||||
|
||||
var user = require('../../user');
|
||||
var meta = require('../../meta');
|
||||
@@ -112,7 +113,12 @@ module.exports = function (SocketUser) {
|
||||
reason: reason,
|
||||
};
|
||||
|
||||
emailer.send('banned', uid, data, next);
|
||||
emailer.send('banned', uid, data, function (err) {
|
||||
if (err) {
|
||||
winston.error('[emailer.send] ' + err.message);
|
||||
}
|
||||
next();
|
||||
});
|
||||
},
|
||||
function (next) {
|
||||
user.ban(uid, until, reason, next);
|
||||
|
||||
@@ -205,7 +205,7 @@ Upgrade.incrementProgress = function (value) {
|
||||
if (this.total) {
|
||||
percentage = Math.floor((this.current / this.total) * 100) + '%';
|
||||
filled = Math.floor((this.current / this.total) * 15);
|
||||
unfilled = Math.min(0, 15 - filled);
|
||||
unfilled = Math.max(0, 15 - filled);
|
||||
}
|
||||
|
||||
readline.cursorTo(process.stdout, 0);
|
||||
|
||||
@@ -31,7 +31,7 @@ widgets.render = function (uid, options, callback) {
|
||||
var returnData = {};
|
||||
|
||||
async.each(locations, function (location, done) {
|
||||
widgetsByLocation[location] = (data.global[location] || []).concat(data[options.template][location] || []);
|
||||
widgetsByLocation[location] = (data[options.template][location] || []).concat(data.global[location] || []);
|
||||
|
||||
if (!widgetsByLocation[location].length) {
|
||||
return done(null, { location: location, widgets: [] });
|
||||
|
||||
Reference in New Issue
Block a user