Avoid breaking wikis that were modifying $wgDummyLanguageCodes
authorTTO <at.light@live.com.au>
Thu, 9 Mar 2017 00:12:01 +0000 (00:12 +0000)
committerTTO <at.light@live.com.au>
Thu, 9 Mar 2017 01:15:58 +0000 (01:15 +0000)
Follow-up to If73c74ee87d8235381449cab7dcd9f46b0f23590.

Change-Id: I51b7ecf51860bfddea87fcf7cad17295088e1dd9

RELEASE-NOTES-1.29
includes/DefaultSettings.php
includes/Setup.php

index 5bc66fd..e0c6e54 100644 (file)
@@ -33,6 +33,8 @@ production.
   feature flag will likely be removed before 1.29 is released.
 * (T158474) "Unknown user" has been added to $wgReservedUsernames.
 * (T156983) $wgRateLimitsExcludedIPs now accepts CIDR ranges as well as single IPs.
+* $wgDummyLanguageCodes is deprecated. Additional language code mappings may be
+  added to $wgExtraLanguageCodes instead.
 
 === New features in 1.29 ===
 * (T5233) A cookie can now be set when a user is autoblocked, to track that user
index dce6d3c..192ad08 100644 (file)
@@ -2904,6 +2904,14 @@ $wgExtraLanguageCodes = [
        'simple' => 'en', // Simple English
 ];
 
+/**
+ * Functionally the same as $wgExtraLanguageCodes, but deprecated. Instead of
+ * appending values to this array, append them to $wgExtraLanguageCodes.
+ *
+ * @deprecated since 1.29
+ */
+$wgDummyLanguageCodes = [];
+
 /**
  * Set this to true to replace Arabic presentation forms with their standard
  * forms in the U+0600-U+06FF block. This only works if $wgLanguageCode is
index e686cd8..5ea96dd 100644 (file)
@@ -403,13 +403,11 @@ if ( is_array( $wgExtraNamespaces ) ) {
        $wgCanonicalNamespaceNames = $wgCanonicalNamespaceNames + $wgExtraNamespaces;
 }
 
-// Merge in the legacy language codes, unless overridden in the config
-if ( !isset( $wgDummyLanguageCodes ) ) {
-       $wgDummyLanguageCodes = [
-               'qqq' => 'qqq', // Used for message documentation
-               'qqx' => 'qqx', // Used for viewing message keys
-       ] + $wgExtraLanguageCodes + LanguageCode::getDeprecatedCodeMapping();
-}
+// Merge in the legacy language codes, incorporating overrides from the config
+$wgDummyLanguageCodes += [
+       'qqq' => 'qqq', // Used for message documentation
+       'qqx' => 'qqx', // Used for viewing message keys
+] + $wgExtraLanguageCodes + LanguageCode::getDeprecatedCodeMapping();
 
 // These are now the same, always
 // To determine the user language, use $wgLang->getCode()