MarkTraceur has uploaded a new change for review.
https://gerrit.wikimedia.org/r/50036
Change subject: (bug 41716) Add siprop=languagevariants
......................................................................
(bug 41716) Add siprop=languagevariants
Parsoid again needs an extra siprop, this time so we can support language
variant conversion on our side of things.
Change-Id: I1ec7da2ec5b08228e74fec4fb366dae26cab8936
---
M includes/api/ApiQuerySiteinfo.php
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/36/50036/1
diff --git a/includes/api/ApiQuerySiteinfo.php
b/includes/api/ApiQuerySiteinfo.php
index 624711a..2e3ade6 100644
--- a/includes/api/ApiQuerySiteinfo.php
+++ b/includes/api/ApiQuerySiteinfo.php
@@ -99,6 +99,9 @@
case 'protocols':
$fit = $this->appendProtocols( $p );
break;
+ case 'languagevariants':
+ $fit = $this->appendLanguageVariants(
$p );
+ break;
default:
ApiBase::dieDebug( __METHOD__, "Unknown
prop=$p" );
}
@@ -560,6 +563,17 @@
return $this->getResult()->addValue( 'query', $property,
$protocols );
}
+ public function appendLanguageVariants( $property ) {
+ global $wgDisableLangConversion,
+ $wgDisableTitleConversion,
+ $wgDefaultLanguageVariant;
+ return $this->getResult()->addValue( 'query', $property, array(
+ 'enabled' => !$wgDisableLangConversion,
+ 'titles' => !$wgDisableTitleConversion,
+ 'default' => $wgDefaultLanguageVariant,
+ ) );
+ }
+
private function formatParserTags( $item ) {
return "<{$item}>";
}
@@ -613,6 +627,7 @@
'showhooks',
'variables',
'protocols',
+ 'languagevariants',
)
),
'filteriw' => array(
@@ -651,6 +666,7 @@
' showhooks - Returns a list of all
subscribed hooks (contents of $wgHooks)',
' variables - Returns a list of
variable IDs',
' protocols - Returns a list of
protocols that are allowed in external links.',
+ ' languagevariants - Returns information
about whether language variant conversion is enabled on the wiki.',
),
'filteriw' => 'Return only local or only nonlocal
entries of the interwiki map',
'showalldb' => 'List all database servers, not just the
one lagging the most',
--
To view, visit https://gerrit.wikimedia.org/r/50036
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ec7da2ec5b08228e74fec4fb366dae26cab8936
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits