From: Alexander Ebert Date: Mon, 15 Aug 2016 14:14:24 +0000 (+0200) Subject: Use absolute URIs for ajax requests X-Git-Tag: 3.0.0_Beta_1~748 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ca5140b5f61b0fd4e68a2b74913176533261d8ff;p=GitHub%2FWoltLab%2FWCF.git Use absolute URIs for ajax requests --- 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 = '';