Use absolute URIs for ajax requests
authorAlexander Ebert <ebert@woltlab.com>
Mon, 15 Aug 2016 14:14:24 +0000 (16:14 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 15 Aug 2016 14:14:24 +0000 (16:14 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js
wcfsetup/install/files/js/WoltLabSuite/Core/Core.js

index 91c4380b3bea43669fb62c00247eb77ee59cd4c2..7be7c8c2cf33698c5e9184406ae791ef5ca1b9a1 100644 (file)
@@ -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);
index af6914993d7528453ec0ccdffed86ea24e609fb5..2ee07d0117b93e03363f500e6e36eb8657a517c0 100644 (file)
@@ -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 = '';