From 60c9a71c35c883c84538842f86202e2ecb93d08a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 26 Feb 2019 16:04:02 +0100 Subject: [PATCH] Fix redirect in Message/Reply#_insertMessage if the new URL is the current This might happen if the AJAX request intentionally returns the URL to an existing content (e.g. to prevent duplicate content or when performing automated merges). --- .../install/files/js/WoltLabSuite/Core/Ui/Message/Reply.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Reply.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Reply.js index e5ef0f4ced..8979bf2a2f 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Reply.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Reply.js @@ -321,6 +321,9 @@ define(['Ajax', 'Core', 'EventHandler', 'Language', 'Dom/ChangeListener', 'Dom/U //noinspection JSUnresolvedVariable if (data.returnValues.url) { //noinspection JSUnresolvedVariable + if (window.location == data.returnValues.url) { + window.location.reload(); + } window.location = data.returnValues.url; } else { -- 2.20.1