X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fcache%2Flocalisation%2FLocalisationCache.php;h=9cf7acf6f152e37e56a57985fb6eb8a0e5d8b03b;hb=ec144bdf18cea555602cca7d5fdf0c4ad7968704;hp=90108eb6828dc4b07a551d0fec7846be935700a4;hpb=9c185ca85c3c58f96e866c9347c2b7f031ddb289;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/cache/localisation/LocalisationCache.php b/includes/cache/localisation/LocalisationCache.php index 90108eb682..9cf7acf6f1 100644 --- a/includes/cache/localisation/LocalisationCache.php +++ b/includes/cache/localisation/LocalisationCache.php @@ -203,6 +203,7 @@ class LocalisationCache { break; case 'db': $storeClass = LCStoreDB::class; + $storeConf['server'] = $conf['storeServer'] ?? []; break; case 'array': $storeClass = LCStoreStaticArray::class; @@ -215,6 +216,7 @@ class LocalisationCache { $storeClass = LCStoreCDB::class; } else { $storeClass = LCStoreDB::class; + $storeConf['server'] = $conf['storeServer'] ?? []; } break; default: @@ -524,7 +526,12 @@ class LocalisationCache { Wikimedia\restoreWarnings(); if ( $_fileType == 'core' || $_fileType == 'extension' ) { + + // Lnguage files aren't required to contain all the possible variables, so suppress warnings + // when variables don't exist in tests + Wikimedia\suppressWarnings(); $data = compact( self::$allKeys ); + Wikimedia\restoreWarnings(); } elseif ( $_fileType == 'aliases' ) { $data = compact( 'aliases' ); } else { @@ -793,7 +800,7 @@ class LocalisationCache { return [ 'core' => "$IP/languages/i18n", 'api' => "$IP/includes/api/i18n", - 'oojs-ui' => "$IP/resources/lib/oojs-ui/i18n", + 'oojs-ui' => "$IP/resources/lib/ooui/i18n", ] + $messagesDirs; }