Skip to content

Node.js based forum software built for the modern web

re-added deprecation notice for Settings.init, closes #4844

Julian Lamd58657178fae
diff --git a/public/src/admin/settings.js b/public/src/admin/settings.js
index ebd986c3e0..0c341151e1 100644
--- a/public/src/admin/settings.js
+++ b/public/src/admin/settings.js
@@ -1,9 +1,14 @@
-"use strict";
-/*global define, app, socket, ajaxify, RELATIVE_PATH */
+'use strict';
+/*global define, app, socket, ajaxify */
-define('admin/settings', ['uploader', 'sounds'], function(uploader, sounds) {
+define('admin/settings', ['uploader'], function(uploader) {
var Settings = {};
+ Settings.init = function() {
+ console.warn('[deprecation] require(\'admin/settings\').init() has been deprecated, please call require(\'admin/settings\').prepare() directly instead.');
+ Settings.prepare();
+ };
+
Settings.populateTOC = function() {
$('.settings-header').each(function() {
var header = $(this).text(),
@@ -55,7 +60,7 @@ define('admin/settings', ['uploader', 'sounds'], function(uploader, sounds) {
}
}
- revertBtn.off('click').on('click', function(e) {
+ revertBtn.off('click').on('click', function() {
ajaxify.refresh();
});