Fix category edits (#1823)

This commit is contained in:
Vivek Maskara 2018-08-13 22:17:23 +05:30 committed by Josephine Lim
parent 634814e9d0
commit 7dee0a45b1

View file

@ -270,7 +270,8 @@ public class ApacheHttpClientMediaWikiApi implements MediaWikiApi {
public String edit(String editToken, String processedPageContent, String filename, String summary) throws IOException { public String edit(String editToken, String processedPageContent, String filename, String summary) throws IOException {
return api.action("edit") return api.action("edit")
.param("title", filename) .param("title", filename)
.param("token", editToken) .param("token", getEditToken())
.param("centralauthtoken", getCentralAuthToken())
.param("text", processedPageContent) .param("text", processedPageContent)
.param("summary", summary) .param("summary", summary)
.post() .post()
@ -283,7 +284,8 @@ public class ApacheHttpClientMediaWikiApi implements MediaWikiApi {
public String appendEdit(String editToken, String processedPageContent, String filename, String summary) throws IOException { public String appendEdit(String editToken, String processedPageContent, String filename, String summary) throws IOException {
return api.action("edit") return api.action("edit")
.param("title", filename) .param("title", filename)
.param("token", editToken) .param("token", getEditToken())
.param("centralauthtoken", getCentralAuthToken())
.param("appendtext", processedPageContent) .param("appendtext", processedPageContent)
.param("summary", summary) .param("summary", summary)
.post() .post()
@ -295,7 +297,8 @@ public class ApacheHttpClientMediaWikiApi implements MediaWikiApi {
public String prependEdit(String editToken, String processedPageContent, String filename, String summary) throws IOException { public String prependEdit(String editToken, String processedPageContent, String filename, String summary) throws IOException {
return api.action("edit") return api.action("edit")
.param("title", filename) .param("title", filename)
.param("token", editToken) .param("token", getEditToken())
.param("centralauthtoken", getCentralAuthToken())
.param("prependtext", processedPageContent) .param("prependtext", processedPageContent)
.param("summary", summary) .param("summary", summary)
.post() .post()