GWicke has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/69905


Change subject: Bug 49411: Always use wiki.apiURI for API requests
......................................................................

Bug 49411: Always use wiki.apiURI for API requests

Debugging output showed a discrepancy between parsoid.apiURI and wiki.apiURI
in some cases. The wiki version is correct in any case, so use that in any
case. This should fix the bug.

We should still investigate why parsoid.apiURI is sometimes not set up
properly.

Change-Id: I495c294a5dbafadac133c0b377b576d297ca529d
---
M js/lib/mediawiki.ApiRequest.js
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/05/69905/1

diff --git a/js/lib/mediawiki.ApiRequest.js b/js/lib/mediawiki.ApiRequest.js
index 0d0ad98..f6f13b8 100644
--- a/js/lib/mediawiki.ApiRequest.js
+++ b/js/lib/mediawiki.ApiRequest.js
@@ -219,7 +219,7 @@
                apiargs.revids = oldid;
                delete apiargs.titles;
        }
-       var url = env.conf.parsoid.apiURI + '?' +
+       var url = env.conf.wiki.apiURI + '?' +
                qs.stringify( apiargs );
                
//'?format=json&action=query&prop=revisions&rvprop=content&titles=' + title;
 
@@ -347,7 +347,7 @@
                title: title,
                text: text
        };
-       var url = env.conf.parsoid.apiURI;
+       var url = env.conf.wiki.apiURI;
 
        this.requestOptions = {
                // Use POST since we are passing a bit of source, and GET has a 
very
@@ -388,6 +388,8 @@
                src = data.expandtemplates['*'];
 
                // Split off the contentlang debugging hack and check the 
language
+               // TODO: remove when
+               // https://bugzilla.wikimedia.org/show_bug.cgi?id=49411 is 
fixed!
                var bits = src.match(/^([^]*)\|([a-z-]+)$/);
                if (bits) {
                        src = bits[1];
@@ -444,7 +446,7 @@
                text: text,
                disablepp: 'true'
        };
-       var url = env.conf.parsoid.apiURI;
+       var url = env.conf.wiki.apiURI;
 
        this.requestOptions = {
                // Use POST since we are passing a bit of source, and GET has a 
very

-- 
To view, visit https://gerrit.wikimedia.org/r/69905
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I495c294a5dbafadac133c0b377b576d297ca529d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to