fixed #1351 -- ACP will tell user that they need to restart, if they need to restart

This commit is contained in:
Julian Lam
2014-04-16 15:11:00 -04:00
parent 8cb2b9b97a
commit 84a34933fe
3 changed files with 9 additions and 1 deletions

View File

@@ -37,7 +37,8 @@ adminController.home = function(req, res, next) {
res.render('admin/index', {
version: pkg.version,
emailerInstalled: plugins.hasListeners('action:email.send'),
searchInstalled: plugins.hasListeners('filter:search.query')
searchInstalled: plugins.hasListeners('filter:search.query'),
restartRequired: meta.restartRequired
});
};

View File

@@ -18,7 +18,9 @@ var fs = require('fs'),
User = require('./user');
(function (Meta) {
Meta.restartRequired = false;
Meta.config = {};
Meta.configs = {
init: function (callback) {
delete Meta.config;
@@ -159,6 +161,9 @@ var fs = require('fs'),
db.setObjectField('config', 'theme:src', data.src, callback);
break;
}
// Restart Required flag
meta.restartRequired = true;
}
};

View File

@@ -383,6 +383,8 @@ var fs = require('fs'),
return;
}
// Restart Required flag
meta.restartRequired = true;
if(active) {
Plugins.fireHook('action:plugin.deactivate', id);