Avoid using deprecated InterwikiLoadPrefix hook in test setup

Bug: T270444
Change-Id: I42d0474ae6f758207357373ecb6b4f2f5f853a7d
This commit is contained in:
C. Scott Ananian 2020-12-22 09:40:29 -05:00
parent 0ef3cb931f
commit 0d8bad3f9d

View file

@ -4,20 +4,15 @@ $wgRightsUrl = "http://creativecommons.org/licenses/by-sa/3.0/";
// Allow users to edit privacy link.
$wgGroupPermissions['user']['editinterface'] = true;
$wgHooks['InterwikiLoadPrefix'][] = function ( $prefix, &$iwdata ) {
if ( $prefix === 'es' ) {
// return our hardcoded interwiki info
$iwdata = [
'iw_url' => 'http://wikifoo.org/es/index.php/$1',
'iw_local' => 0,
'iw_trans' => 0,
];
return false;
}
// nothing to do, continue lookup
return true;
};
$wgInterwikiCache = false;
// Use hard-coded interwiki information
$wgInterwikiCache = \MediaWiki\Interwiki\ClassicInterwikiLookup::buildCdbHash( [
[
'iw_prefix' => 'es',
'iw_url' => 'http://wikifoo.org/es/index.php/$1',
'iw_local' => 0,
'iw_trans' => 0,
],
] );
$wgMinervaPageIssuesNewTreatment = [
"base" => true,