jenkins-bot has submitted this change and it was merged.

Change subject: Pass title to action=parse requests for extensions
......................................................................


Pass title to action=parse requests for extensions

Test case:
http://localhost:8000/frwikisource/Les_Jeux_rustiques_et_divins%2FExorde?oldid=4662317

The navigation now properly shows the prev & next page links.

Bug: 69190
Change-Id: I0dabedab8a6a38ca9e3ac750b257358de58f3440
---
M lib/mediawiki.ApiRequest.js
1 file changed, 8 insertions(+), 2 deletions(-)

Approvals:
  Arlolra: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/mediawiki.ApiRequest.js b/lib/mediawiki.ApiRequest.js
index a41c7a0..d55c513 100644
--- a/lib/mediawiki.ApiRequest.js
+++ b/lib/mediawiki.ApiRequest.js
@@ -445,8 +445,8 @@
  * @param {string} title The title of the page to use as context
  * @param {string} text
  */
-function PHPParseRequest ( env, title, text ) {
-       ApiRequest.call(this, env, title);
+function PHPParseRequest ( env, name, text ) {
+       ApiRequest.call(this, env, name);
 
        this.text = text;
        this.queueKey = text;
@@ -460,6 +460,12 @@
        };
        var uri = env.conf.wiki.apiURI;
 
+       // Pass the page title to the API
+       var title = env.page && env.page.title && env.page.title.key;
+       if (title) {
+               apiargs.title = title;
+       }
+
        this.requestOptions = {
                // Use POST since we are passing a bit of source, and GET has a 
very
                // limited length. You'll be greeted by "HTTP Error 414 Request 
URI

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0dabedab8a6a38ca9e3ac750b257358de58f3440
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: Marcoil <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: Tpt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to