* Make action=block respect $wgEnableUserEmail and $wgSysopEmailBans
* Made deleting file description pages without files possible
* (bug 18773) Add content flag to siprop=namespaces output
+* (bug 18785) Add siprop=languages to meta=siteinfo
=== Languages updated in 1.16 ===
case 'rightsinfo':
$fit = $this->appendRightsInfo( $p );
break;
+ case 'languages':
+ $fit = $this->appendLanguages( $p );
+ break;
default :
ApiBase :: dieDebug( __METHOD__, "Unknown prop=$p" );
}
return $this->getResult()->addValue( 'query', $property, $data );
}
+ public function appendLanguages( $property ) {
+ global $wgLanguageNames;
+ $data = array();
+ foreach( $wgLanguageNames as $code => $name ) {
+ $lang = array( 'code' => $code );
+ ApiResult::setContent( $lang, $name );
+ $data[] = $lang;
+ }
+ $this->getResult()->setIndexedTagName( $data, 'lang' );
+ return $this->getResult()->addValue( 'query', $property, $data );
+ }
+
public function getAllowedParams() {
return array(
'extensions',
'fileextensions',
'rightsinfo',
+ 'languages',
)
),
'filteriw' => array(
' extensions - Returns extensions installed on the wiki',
' fileextensions - Returns list of file extensions allowed to be uploaded',
' rightsinfo - Returns wiki rights (license) information if available',
+ ' languages - Returns a list of languages MediaWiki supports',
),
'filteriw' => 'Return only local or only nonlocal entries of the interwiki map',
'showalldb' => 'List all database servers, not just the one lagging the most',