Remove last bits of MediaWiki 1.19 compatibility

Compatibility with MediaWiki 1.19 had already been dropped and this hadn't
been removed yet.

Change-Id: I63788ef1d4a6eb87e4280ea2625579a7874eaff8
This commit is contained in:
Siebrand Mazeland
2013-06-17 16:44:00 +02:00
parent 9ac9163ecf
commit 4a1035dcbf
3 changed files with 8 additions and 24 deletions

View File

@@ -36,14 +36,9 @@ class ResourceLoaderULSModule extends ResourceLoaderModule {
*/
protected function getData() {
$vars = array();
if ( method_exists( 'Language', 'fetchLanguageNames' ) ) {
// since 1.20
$vars['wgULSLanguages'] = Language::fetchLanguageNames(
$this->language->getCode(), 'mwfile'
);
} else {
$vars['wgULSLanguages'] = Language::getLanguageNames( false );
}
$vars['wgULSLanguages'] = Language::fetchLanguageNames(
$this->language->getCode(), 'mwfile'
);
return $vars;
}

View File

@@ -101,7 +101,7 @@ class UniversalLanguageSelectorHooks {
$lang = $context->getLanguage();
$personal_urls = array(
'uls' => array(
'text' => $lang->getLanguageName( $lang->getCode() ),
'text' => $lang->fetchLanguageName( $lang->getCode() ),
'href' => '#',
'class' => 'uls-trigger',
'active' => true
@@ -113,11 +113,7 @@ class UniversalLanguageSelectorHooks {
protected static function isSupportedLanguage( $language ) {
wfProfileIn( __METHOD__ );
if ( method_exists( 'Language', 'fetchLanguageNames' ) ) {
$supported = Language::fetchLanguageNames( null, 'mwfile' ); // since 1.20
} else {
$supported = Language::getLanguageNames( false );
}
$supported = Language::fetchLanguageNames( null, 'mwfile' ); // since 1.20
wfProfileOut( __METHOD__ );
return isset( $supported[$language] );
@@ -129,11 +125,8 @@ class UniversalLanguageSelectorHooks {
*/
protected static function getDefaultLanguage( array $preferred ) {
wfProfileIn( __METHOD__ );
if ( method_exists( 'Language', 'fetchLanguageNames' ) ) {
$supported = Language::fetchLanguageNames( null, 'mwfile' ); // since 1.20
} else {
$supported = Language::getLanguageNames( false );
}
$supported = Language::fetchLanguageNames( null, 'mwfile' ); // since 1.20
// look for a language that is acceptable to the client
// and known to the wiki.
foreach ( $preferred as $code => $weight ) {

View File

@@ -33,11 +33,7 @@ class LanguageNameIndexer extends Maintenance {
}
public function execute() {
if ( method_exists( 'Language', 'fetchLanguageNames' ) ) {
$languages = Language::fetchLanguageNames( null, 'all' ); // since 1.20
} else {
$languages = Language::getLanguageNames( false );
}
$languages = Language::fetchLanguageNames( null, 'all' ); // since 1.20
$all = array();
$buckets = array();