diff --git a/src/controllers/admin/dashboard.js b/src/controllers/admin/dashboard.js index 24a65983f1..84ee4fd3d0 100644 --- a/src/controllers/admin/dashboard.js +++ b/src/controllers/admin/dashboard.js @@ -19,8 +19,8 @@ dashboardController.get = function(req, res, next) { var notices = [ { done: !meta.reloadRequired, - doneText: 'Reload not required', - notDoneText:'Reload required' + doneText: 'Restart not required', + notDoneText:'Restart required' }, { done: plugins.hasListeners('filter:search.query'), diff --git a/src/meta.js b/src/meta.js index 1cbd1af0ae..8dfbc0d99a 100644 --- a/src/meta.js +++ b/src/meta.js @@ -41,50 +41,14 @@ var async = require('async'), }); }; + /** + * Reload deprecated as of v1.1.2+, remove in v2.x + */ Meta.reload = function(callback) { - pubsub.publish('meta:reload', {hostname: os.hostname()}); - reload(callback); + restart(); + callback(); }; - pubsub.on('meta:reload', function(data) { - if (data.hostname !== os.hostname()) { - reload(); - } - }); - - function reload(callback) { - callback = callback || function() {}; - - var plugins = require('./plugins'); - async.series([ - function (next) { - plugins.fireHook('static:app.reload', {}, next); - }, - async.apply(plugins.clearRequireCache), - async.apply(Meta.css.minify), - async.apply(Meta.js.minify, 'nodebb.min.js'), - async.apply(Meta.js.minify, 'acp.min.js'), - async.apply(Meta.sounds.init), - async.apply(languages.init), - async.apply(Meta.templates.compile), - async.apply(plugins.reload), - async.apply(plugins.reloadRoutes), - async.apply(auth.reloadRoutes), - function(next) { - Meta.config['cache-buster'] = utils.generateUUID(); - templates.flush(); - next(); - } - ], function(err) { - if (!err) { - emitter.emit('nodebb:ready'); - } - Meta.reloadRequired = false; - - callback(err); - }); - } - Meta.restart = function() { pubsub.publish('meta:restart', {hostname: os.hostname()}); restart(); diff --git a/src/meta/themes.js b/src/meta/themes.js index c3d912a222..ed6b061db9 100644 --- a/src/meta/themes.js +++ b/src/meta/themes.js @@ -161,6 +161,4 @@ module.exports = function(Meta) { nconf.set('theme_templates_path', themePath); nconf.set('theme_config', path.join(nconf.get('themes_path'), themeObj.id, 'theme.json')); }; - - }; \ No newline at end of file diff --git a/src/socket.io/admin.js b/src/socket.io/admin.js index a290238e21..556eee0290 100644 --- a/src/socket.io/admin.js +++ b/src/socket.io/admin.js @@ -49,21 +49,10 @@ SocketAdmin.before = function(socket, method, data, next) { }); }; -SocketAdmin.reload = function(socket, data, callback) { - events.log({ - type: 'reload', - uid: socket.uid, - ip: socket.ip - }); - if (process.send) { - process.send({ - action: 'reload' - }); - callback(); - } else { - meta.reload(callback); - } -}; +/** + * Reload deprecated as of v1.1.2+, remove in v2.x + */ +SocketAdmin.reload = SocketAdmin.restart; SocketAdmin.restart = function(socket, data, callback) { events.log({ diff --git a/src/views/admin/general/dashboard.tpl b/src/views/admin/general/dashboard.tpl index 6ea841352a..a478c21c16 100644 --- a/src/views/admin/general/dashboard.tpl +++ b/src/views/admin/general/dashboard.tpl @@ -95,11 +95,10 @@
System Control

- - +

- Maintenance Mode + Maintenance Mode


diff --git a/src/views/admin/partials/menu.tpl b/src/views/admin/partials/menu.tpl index e35b41847c..34ddbf9acd 100644 --- a/src/views/admin/partials/menu.tpl +++ b/src/views/admin/partials/menu.tpl @@ -121,11 +121,6 @@
@@ -96,7 +96,7 @@

Lowering this value causes NodeBB to become more sensitive to spikes in load, but - may also cause the check to become too sensitive. (Reload required) + may also cause the check to become too sensitive. (Restart required)