From ca5140b5f61b0fd4e68a2b74913176533261d8ff Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 15 Aug 2016 16:14:24 +0200 Subject: [PATCH] Use absolute URIs for ajax requests --- wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js | 3 +++ wcfsetup/install/files/js/WoltLabSuite/Core/Core.js | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js index 91c4380b3b..7be7c8c2cf 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js @@ -61,6 +61,9 @@ define(['Core', 'Language', 'Dom/ChangeListener', 'Dom/Util', 'Ui/Dialog', 'Wolt } this._options.url = Core.convertLegacyUrl(this._options.url); + if (this._options.url.indexOf('index.php') === 0) { + this._options.url = WCF_PATH + this._options.url; + } if (this._options.pinData) { this._data = Core.extend({}, this._options.data); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Core.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Core.js index af6914993d..2ee07d0117 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Core.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Core.js @@ -57,10 +57,6 @@ define([], function() { * @return rewritten url */ convertLegacyUrl: function(url) { - if (URL_LEGACY_MODE) { - return url; - } - return url.replace(/^index\.php\/(.*?)\/\?/, function(match, controller) { var parts = controller.split(/([A-Z][a-z0-9]+)/); controller = ''; -- 2.20.1