Fix TemplateData API not properly working with a generator

All API modules that are a submodule of the action=query API do
this already. What this method does is to forward all additional
information from the "generator" module to the module that uses
the generator as input. Without this line only the list of pages
is forwarded, but all metadata is lost.

The thing is: The templatedata API is not an action=query API,
but a separate action. But it's largly compatible. It might
even be possible to turn it into an action=query API, but this
is beyond our capacity at the moment.

Bug: T274907
Change-Id: I3c3c684109688c112ec15424119d4d30430ffd86
This commit is contained in:
Thiemo Kreuz 2021-06-10 14:46:11 +02:00
parent 6da6f96aaa
commit 0bfb242ecc

View file

@ -183,6 +183,7 @@ class ApiTemplateData extends ApiBase {
}
}
$pageSet->populateGeneratorData( $resp );
ApiResult::setArrayType( $resp, 'kvp', 'id' );
ApiResult::setIndexedTagName( $resp, 'page' );