* (T76051) list=tags will now continue correctly.
* (T76052) list=tags can now indicate whether a tag is defined.
* (T75522) list=prefixsearch now supports continuation
+* (T78737) action=expandtemplates can now return page properties.
=== Action API internal changes in 1.25 ===
* ApiHelp has been rewritten to support i18n and paginated HTML output.
} else {
if ( isset( $prop['categories'] ) ) {
$categories = $wgParser->getOutput()->getCategories();
- if ( !empty( $categories ) ) {
+ if ( $categories ) {
$categories_result = array();
foreach ( $categories as $category => $sortkey ) {
$entry = array();
$retval['categories'] = $categories_result;
}
}
+ if ( isset( $prop['properties'] ) ) {
+ $properties = $wgParser->getOutput()->getProperties();
+ if ( $properties ) {
+ $properties_result = array();
+ foreach ( $properties as $name => $value ) {
+ $entry = array();
+ $entry['name'] = $name;
+ ApiResult::setContent( $entry, $value );
+ $properties_result[] = $entry;
+ }
+ $result->setIndexedTagName( $properties_result, 'property' );
+ $retval['properties'] = $properties_result;
+ }
+ }
if ( isset( $prop['volatile'] ) && $frame->isVolatile() ) {
$retval['volatile'] = '';
}
ApiBase::PARAM_TYPE => array(
'wikitext',
'categories',
+ 'properties',
'volatile',
'ttl',
'parsetree',
"apihelp-expandtemplates-param-title": "Title of page.",
"apihelp-expandtemplates-param-text": "Wikitext to convert.",
"apihelp-expandtemplates-param-revid": "Revision ID, for <nowiki>{{REVISIONID}}</nowiki> and similar variables.",
- "apihelp-expandtemplates-param-prop": "Which pieces of information to get:\n;wikitext:The expanded wikitext.\n;categories:Any categories present in the input that are not represented in the wikitext output.\n;volatile:Whether the output is volatile and should not be reused elsewhere within the page.\n;ttl:The maximum time after which caches of the result should be invalidated.\n;parsetree:The XML parse tree of the input.\nNote that if no values are selected, the result will contain the wikitext, but the output will be in a deprecated format.",
+ "apihelp-expandtemplates-param-prop": "Which pieces of information to get:\n;wikitext:The expanded wikitext.\n;categories:Any categories present in the input that are not represented in the wikitext output.\n;properties:Page properties defined by expanded magic words in the wikitext.\n;volatile:Whether the output is volatile and should not be reused elsewhere within the page.\n;ttl:The maximum time after which caches of the result should be invalidated.\n;parsetree:The XML parse tree of the input.\nNote that if no values are selected, the result will contain the wikitext, but the output will be in a deprecated format.",
"apihelp-expandtemplates-param-includecomments": "Whether to include HTML comments in the output.",
"apihelp-expandtemplates-param-generatexml": "Generate XML parse tree (replaced by $1prop=parsetree).",
"apihelp-expandtemplates-example-simple": "Expand the wikitext \"<nowiki>{{Project:Sandbox}}</nowiki>\"",