(bug 33224) add variants of content language to meta=siteinfo
Change-Id: I0b92e1e626f0c5bc543c5d134eb44d7ca7722217
This commit is contained in:
parent
de3d0ba4f7
commit
ffa3486aa8
2 changed files with 10 additions and 0 deletions
|
|
@ -112,6 +112,7 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki.
|
|||
* (bug 30488) API now allows listing of backlinks/embeddedin/imageusage per pageid
|
||||
* (bug 34927) Output media_type for list=filearchive
|
||||
* (bug 28814) add properties to output of action=parse
|
||||
* (bug 33224) add variants of content language to meta=siteinfo
|
||||
|
||||
=== Languages updated in 1.20 ===
|
||||
|
||||
|
|
|
|||
|
|
@ -142,6 +142,15 @@ class ApiQuerySiteinfo extends ApiQueryBase {
|
|||
$data['fallback'] = $fallbacks;
|
||||
$this->getResult()->setIndexedTagName( $data['fallback'], 'lang' );
|
||||
|
||||
if( $wgContLang->hasVariants() ) {
|
||||
$variants = array();
|
||||
foreach( $wgContLang->getVariants() as $code ) {
|
||||
$variants[] = array( 'code' => $code );
|
||||
}
|
||||
$data['variants'] = $variants;
|
||||
$this->getResult()->setIndexedTagName( $data['variants'], 'lang' );
|
||||
}
|
||||
|
||||
if ( $wgContLang->isRTL() ) {
|
||||
$data['rtl'] = '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue