From bc8adff70a28b7b5624fb6ede18cfc1ec09614db Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Wed, 18 Dec 2013 15:32:38 -0500 Subject: [PATCH] fixed plugin deactivation --- src/plugins.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/plugins.js b/src/plugins.js index ca7114da82..2681b30dea 100644 --- a/src/plugins.js +++ b/src/plugins.js @@ -274,10 +274,17 @@ var fs = require('fs'), return; } + + if(active) { + Plugins.fireHook('action:plugin.deactivate', id); + } + // Reload meta data Plugins.reload(function() { - // (De)activation Hooks - Plugins.fireHook('action:plugin.' + (active ? 'de' : '') + 'activate', id); + + if(!active) { + Plugins.fireHook('action:plugin.activate', id); + } if (callback) { callback({