mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 17:05:51 +01:00
fix: don't move theme/plugin to top if its already active
This commit is contained in:
@@ -63,9 +63,19 @@ function activate(plugin) {
|
||||
if (!isInstalled) {
|
||||
return next(new Error('plugin not installed'));
|
||||
}
|
||||
plugins.isActive(plugin, next);
|
||||
},
|
||||
function (isActive, next) {
|
||||
if (isActive) {
|
||||
winston.info('Plugin `%s` already active', plugin);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
db.sortetSetCard('plugins:active', next);
|
||||
},
|
||||
function (numPlugins, next) {
|
||||
winston.info('Activating plugin `%s`', plugin);
|
||||
db.sortedSetAdd('plugins:active', 0, plugin, next);
|
||||
db.sortedSetAdd('plugins:active', numPlugins, plugin, next);
|
||||
},
|
||||
function (next) {
|
||||
events.log({
|
||||
|
||||
Reference in New Issue
Block a user