mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
fixed #1351 -- themes and plugins no longer auto-restart the server
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
"use strict";
|
||||
/* global define, app, socket */
|
||||
|
||||
define(function() {
|
||||
var Plugins = {
|
||||
init: function() {
|
||||
@@ -19,10 +22,13 @@ define(function() {
|
||||
app.alert({
|
||||
alert_id: 'plugin_toggled',
|
||||
title: 'Plugin ' + (status.active ? 'Enabled' : 'Disabled'),
|
||||
message: 'Restarting your NodeBB <i class="fa fa-refresh fa-spin"></i>',
|
||||
type: 'warning',
|
||||
timeout: 5000
|
||||
})
|
||||
message: 'Please restart your NodeBB to fully ' + (status.active ? 'activate' : 'deactivate') + ' this plugin',
|
||||
type: 'info',
|
||||
timeout: 5000,
|
||||
clickfn: function() {
|
||||
socket.emit('admin.restart');
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
pluginsList.append('<li><p><i>No plugins found.</i></p></li>');
|
||||
|
||||
@@ -39,10 +39,13 @@ define(['forum/admin/settings'], function(Settings) {
|
||||
|
||||
app.alert({
|
||||
alert_id: 'admin:theme',
|
||||
type: 'success',
|
||||
type: 'info',
|
||||
title: 'Theme Changed',
|
||||
message: 'Restarting your NodeBB <i class="fa fa-refresh fa-spin"></i>',
|
||||
timeout: 3500
|
||||
message: 'Please restart your NodeBB to fully activate this theme',
|
||||
timeout: 5000,
|
||||
clickfn: function() {
|
||||
socket.emit('admin.restart');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -79,7 +79,6 @@ SocketAdmin.themes.set = function(socket, data, callback) {
|
||||
widgets.reset(function(err) {
|
||||
meta.themes.set(data, function() {
|
||||
callback();
|
||||
meta.restart();
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -87,7 +86,6 @@ SocketAdmin.themes.set = function(socket, data, callback) {
|
||||
SocketAdmin.plugins.toggle = function(socket, plugin_id) {
|
||||
plugins.toggleActive(plugin_id, function(status) {
|
||||
socket.emit('admin.plugins.toggle', status);
|
||||
meta.restart();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user