Node.js based forum software built for the modern web
closes #5132
barisusaklice9be7e69483
diff --git a/public/src/app.js b/public/src/app.jsindex d8aa8cc979..1720d4acbf 100644--- a/public/src/app.js+++ b/public/src/app.js@@ -288,20 +288,14 @@ app.cacheBuster = null;if (showWelcomeMessage) {showWelcomeMessage = false;- if (document.readyState !== 'complete') {- $(document).ready(showAlert.bind(null, 'login'));- } else {showAlert('login');- }+ });}if (showBannedMessage) {showBannedMessage = false;- if (document.readyState !== 'complete') {- $(document).ready(showAlert.bind(null, 'banned'));- } else {showAlert('banned');- }+ });}};diff --git a/public/src/sockets.js b/public/src/sockets.jsindex cd88c3e5f7..c255287c58 100644--- a/public/src/sockets.js+++ b/public/src/sockets.js@@ -122,16 +122,7 @@ app.isConnected = false;}function onEventBanned() {- app.alert({- title: '[[global:alert.banned]]',- message: '[[global:alert.banned.message]]',- type: 'danger',- timeout: 1000- });-- setTimeout(function () {- window.location.href = config.relative_path + '/';- }, 1000);+ window.location.href = config.relative_path + '/';}}());\ No newline at end of filediff --git a/src/middleware/header.js b/src/middleware/header.jsindex 7e6f6cccbe..53a20e33eb 100644--- a/src/middleware/header.js+++ b/src/middleware/header.js@@ -107,7 +107,7 @@ module.exports = function (middleware) {if (results.banned) {req.logout();- return res.redirect('/?banned=' + (results.banReason || ''));+ return res.redirect('/?banned=' + (results.banReason || 'no-reason'));}results.user.isAdmin = results.isAdmin;