ForeignWikiRequest: Specify formatversion, errorformat

Otherwise the parameters are copied from the local API request.
That mostly works fine, but browsing the errors logged for T342201
is a bit confusing when they're in different formats.

Change-Id: I5c361d6c0f7d635d3063290dec25f18bc6417e08
This commit is contained in:
Bartosz Dziewoński 2023-09-04 23:29:47 +02:00
parent 68d90d69a7
commit c3c3aed4dc

View file

@ -152,6 +152,8 @@ class ForeignWikiRequest {
'meta' => 'tokens',
'type' => $this->tokenType,
'format' => 'json',
'formatversion' => '1',
'errorformat' => 'bc',
'centralauthtoken' => $this->getCentralAuthToken( $this->user ),
], $originalRequest );
$responses = $this->doRequests( $reqs );
@ -232,6 +234,8 @@ class ForeignWikiRequest {
// results in the format the user requested but in a fixed format that
// we can interpret here
'format' => 'json',
'formatversion' => '1',
'errorformat' => 'bc',
] + $extraParams + $this->params;
}