* (bug 27344) add drprefix param to list=deletedrevs.
* (bug 28560) list=deletedrevs should die, if combination of param is invalid.
* (bug 28238) paraminfo: output both limits for multi param
+* (bug 27179) API: List of extension tags through meta=siteinfo
+* Get a list of function hooks through meta=siteinfo
=== Languages updated in 1.18 ===
case 'skins':
$fit = $this->appendSkins( $p );
break;
+ case 'extensiontags':
+ $fit = $this->appendExtensionTags( $p );
+ break;
+ case 'functionhooks':
+ $fit = $this->appendFunctionHooks( $p );
+ break;
default:
ApiBase::dieDebug( __METHOD__, "Unknown prop=$p" );
}
return $this->getResult()->addValue( 'query', $property, $data );
}
-
protected function appendRightsInfo( $property ) {
global $wgRightsPage, $wgRightsUrl, $wgRightsText;
$title = Title::newFromText( $wgRightsPage );
return $this->getResult()->addValue( 'query', $property, $data );
}
+ public function appendExtensionTags( $property ) {
+ global $wgParser;
+ $wgParser->firstCallInit();
+ $tags = array_map( array( $this, 'formatParserTags'), $wgParser->getTags() );
+ $this->getResult()->setIndexedTagName( $tags, 't' );
+ return $this->getResult()->addValue( 'query', $property, $tags );
+ }
+
+ public function appendFunctionHooks( $property ) {
+ global $wgParser;
+ $wgParser->firstCallInit();
+ $hooks = $wgParser->getFunctionHooks();
+ $this->getResult()->setIndexedTagName( $hooks, 'h' );
+ return $this->getResult()->addValue( 'query', $property, $hooks );
+ }
+
+ private function formatParserTags( $item ) {
+ return "<{$item}>";
+ }
+
public function getCacheMode( $params ) {
return 'public';
}
'rightsinfo',
'languages',
'skins',
+ 'extensiontags',
+ 'functionhooks',
)
),
'filteriw' => array(
' rightsinfo - Returns wiki rights (license) information if available',
' languages - Returns a list of languages MediaWiki supports',
' skins - Returns a list of all enabled skins',
+ ' extensiontags - Returns a list of parser extension tags',
+ ' functionhooks - Returns a list of parser function hooks',
),
'filteriw' => 'Return only local or only nonlocal entries of the interwiki map',
'showalldb' => 'List all database servers, not just the one lagging the most',