EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319253

Change subject: Add a wiki configuration tag for configured language
......................................................................

Add a wiki configuration tag for configured language

Within CirrusSearch we need the ability to turn some settings on/off
based on the language of the wiki. We could of course list out all the
wiki's that use the language, but that would be tedious, error prone,
and overly verbose. Instead add a 'wikiTag', per SiteConfiguration::get,
that allows defining settings based on the language of the wiki in
question.

Bug: T149755
Change-Id: I912778fe9ed4ff9286e2a849cad4c4b0de43804e
---
M wmf-config/CommonSettings.php
1 file changed, 9 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/53/319253/1

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index a622558..4af3776 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -176,13 +176,15 @@
        }
 
        $dbSuffix = ( $site === 'wikipedia' ) ? 'wiki' : $site;
-       $globals = $wgConf->getAll( $wgDBname, $dbSuffix,
-               [
-                       'lang'    => $lang,
-                       'docRoot' => $_SERVER['DOCUMENT_ROOT'],
-                       'site'    => $site,
-                       'stdlogo' => 
"//{$wmfHostnames['upload']}/$site/$lang/b/bc/Wiki.png" ,
-               ], $wikiTags );
+       $confParams = [
+               'lang'    => $lang,
+               'docRoot' => $_SERVER['DOCUMENT_ROOT'],
+               'site'    => $site,
+               'stdlogo' => 
"//{$wmfHostnames['upload']}/$site/$lang/b/bc/Wiki.png" ,
+       ];
+       // Add a per-language tag as well
+       $wikiTags[] = $wgConf->get( 'wgLanguageCode', $wgDBname, $dbSuffix, 
$confParams, $wikiTags );
+       $globals = $wgConf->getAll( $wgDBname, $dbSuffix, $confParams, 
$wikiTags );
 
        # Save cache
        @mkdir( '/tmp/mw-cache-' . $wmgVersionNumber );

-- 
To view, visit https://gerrit.wikimedia.org/r/319253
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I912778fe9ed4ff9286e2a849cad4c4b0de43804e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to