Merge remote-tracking branch 'origin/master' into socket.io1.x

v1.18.x
barisusakli 10 years ago
commit 08b0462695

@ -108,17 +108,17 @@ function start() {
loadConfig();
if (!cluster.isWorker || process.env.cluster_setup === 'true') {
winston.info('Time: ' + new Date());
winston.info('Initializing NodeBB v' + pkg.version);
winston.info('* using configuration stored in: ' + configFile);
winston.info('Time: %s', (new Date()).toString());
winston.info('Initializing NodeBB v%s', pkg.version);
winston.info('* using configuration stored in: %s', configFile);
}
if (cluster.isWorker && process.env.cluster_setup === 'true') {
var host = nconf.get(nconf.get('database') + ':host'),
storeLocation = host ? 'at ' + host + (host.indexOf('/') === -1 ? ':' + nconf.get(nconf.get('database') + ':port') : '') : '';
winston.info('* using ' + nconf.get('database') +' store ' + storeLocation);
winston.info('* using themes stored in: ' + nconf.get('themes_path'));
winston.info('* using %s store %s', nconf.get('database'), storeLocation);
winston.info('* using themes stored in: %s', nconf.get('themes_path'));
}
require('./src/database').init(function(err) {
@ -170,12 +170,12 @@ function start() {
case 'js-propagate':
meta.js.cache = message.cache;
meta.js.map = message.map;
winston.info('[cluster] Client-side javascript and mapping propagated to worker ' + cluster.worker.id);
winston.info('[cluster] Client-side javascript and mapping propagated to worker %s', cluster.worker.id);
break;
case 'css-propagate':
meta.css.cache = message.cache;
meta.css.acpCache = message.acpCache;
winston.info('[cluster] Stylesheets propagated to worker ' + cluster.worker.id);
winston.info('[cluster] Stylesheets propagated to worker %s', cluster.worker.id);
break;
}
});
@ -265,7 +265,7 @@ function reset() {
if (!err) {
winston.info('[reset] Reset complete.');
} else {
winston.error('[reset] Errors were encountered while resetting your forum settings: ' + err.message);
winston.error('[reset] Errors were encountered while resetting your forum settings: %s', err.message);
}
process.exit();
});
@ -311,14 +311,14 @@ function resetPlugin(pluginId) {
var db = require('./src/database');
db.setRemove('plugins:active', pluginId, function(err, result) {
if (err || result !== 1) {
winston.error('[reset] Could not disable plugin: ' + pluginId);
winston.error('[reset] Could not disable plugin: %s', pluginId);
if (err) {
winston.error('[reset] Encountered error: ' + err.message);
winston.error('[reset] Encountered error: %s', err.message);
} else {
winston.info('[reset] Perhaps it has already been disabled?');
}
} else {
winston.info('[reset] Plugin `' + pluginId + '` disabled');
winston.info('[reset] Plugin `%s` disabled', pluginId);
}
process.exit();

@ -171,7 +171,9 @@ var async = require('async'),
category.name = validator.escape(category.name);
category.disabled = parseInt(category.disabled, 10) === 1;
category.icon = category.icon || 'hidden';
category.post_count = category.post_count || 0;
if (category.hasOwnProperty('post_count')) {
category.post_count = category.post_count || 0;
}
if (category.description) {
category.description = validator.escape(category.description);

@ -105,7 +105,7 @@ module.exports = function(Posts) {
};
function getTopicAndCategories(topicKeys, callback) {
db.getObjectsFields(topicKeys, ['uid', 'tid', 'title', 'cid', 'slug', 'deleted'], function(err, topics) {
db.getObjectsFields(topicKeys, ['uid', 'tid', 'title', 'cid', 'slug', 'deleted', 'postcount'], function(err, topics) {
if (err) {
return callback(err);
}

Loading…
Cancel
Save