one more fix #5607

This commit is contained in:
barisusakli
2017-04-18 13:55:18 -04:00
parent 27a76fcfc9
commit 9e3d8a8090

8
app.js
View File

@@ -219,16 +219,16 @@ function activate() {
db.init(next);
},
function (next) {
if (plugin.indexOf('nodebb-') !== 0) {
// Allow omission of `nodebb-plugin-`
plugin = 'nodebb-plugin-' + plugin;
}
plugins.isInstalled(plugin, next);
},
function (isInstalled, next) {
if (!isInstalled) {
return next(new Error('plugin not installed'));
}
if (plugin.indexOf('nodebb-') !== 0) {
// Allow omission of `nodebb-plugin-`
plugin = 'nodebb-plugin-' + plugin;
}
winston.info('Activating plugin `%s`', plugin);
db.sortedSetAdd('plugins:active', 0, plugin, next);