7 global $wgInterwikiViewOnly;
9 if ( !$wgInterwikiViewOnly ) {
22 global $wgInterwikiViewOnly;
23 if ( !$wgInterwikiViewOnly ) {
25 $rights[] =
'interwiki';
30 global $wgInterwikiCentralDB, $wgInterwikiCentralInterlanguageDB;
33 $shouldSkipIWCheck = ( $wgInterwikiCentralDB ===
null || $wgInterwikiCentralDB ===
wfWikiID() );
34 $shouldSkipILCheck = (
35 $wgInterwikiCentralInterlanguageDB ===
null ||
36 $wgInterwikiCentralInterlanguageDB ===
wfWikiID()
40 if ( $shouldSkipIWCheck && $shouldSkipILCheck ) {
46 if ( !$isInterlanguageLink && !$shouldSkipIWCheck ) {
48 $lookup = MediaWikiServices::getInstance()->getInterwikiLookup();
49 foreach ( $lookup->getAllPrefixes(
null ) as $id => $localPrefixInfo ) {
50 if ( $prefix === $localPrefixInfo[
'iw_prefix'] ) {
58 [
'iw_prefix' => $prefix ],
65 $iwData = (array)
$res;
68 } elseif ( $isInterlanguageLink && !$shouldSkipILCheck ) {
74 [
'iw_prefix' => $prefix ],
81 $iwData = (array)
$res;