<?php
-namespace MediaWiki\Interwiki;
-
/**
* InterwikiLookup implementing the "classic" interwiki storage (hardcoded up to MW 1.26).
*
*
* @file
*/
-use \Cdb\Exception as CdbException;
-use \Cdb\Reader as CdbReader;
-use Database;
+
+namespace MediaWiki\Interwiki;
+
+use Cdb\Exception as CdbException;
+use Cdb\Reader as CdbReader;
use Hooks;
use Interwiki;
use Language;
use MapCacheLRU;
use WANObjectCache;
+use Wikimedia\Rdbms\Database;
/**
* InterwikiLookup implementing the "classic" interwiki storage (hardcoded up to MW 1.26).
private function loadFromArray( $mc ) {
if ( isset( $mc['iw_url'] ) ) {
$url = $mc['iw_url'];
- $local = isset( $mc['iw_local'] ) ? $mc['iw_local'] : 0;
- $trans = isset( $mc['iw_trans'] ) ? $mc['iw_trans'] : 0;
- $api = isset( $mc['iw_api'] ) ? $mc['iw_api'] : '';
- $wikiId = isset( $mc['iw_wikiid'] ) ? $mc['iw_wikiid'] : '';
+ $local = $mc['iw_local'] ?? 0;
+ $trans = $mc['iw_trans'] ?? 0;
+ $api = $mc['iw_api'] ?? '';
+ $wikiId = $mc['iw_wikiid'] ?? '';
return new Interwiki( null, $url, $api, $wikiId, $local, $trans );
}
. $e->getMessage() );
}
- ksort( $data );
-
return array_values( $data );
}