Index: trunk/extensions/WikimediaIncubator/WikimediaIncubator.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | 'path' => __FILE__, |
16 | 16 | 'name' => 'Wikimedia Incubator', |
17 | 17 | 'author' => 'SPQRobin', |
18 | | - 'version' => '4.3.2', |
| 18 | + 'version' => '4.4', |
19 | 19 | 'url' => 'http://www.mediawiki.org/wiki/Extension:WikimediaIncubator', |
20 | 20 | 'descriptionmsg' => 'wminc-desc', |
21 | 21 | ); |
— | — | @@ -143,7 +143,9 @@ |
144 | 144 | $wgHooks['PageContentLanguage'][] = 'IncubatorTest::onPageContentLanguage'; |
145 | 145 | |
146 | 146 | /* List of users */ |
147 | | -$wgAutoloadClasses['ListUsersTestWiki'] = $dir . 'ListUsersTestWiki.php'; |
148 | | -$wgHooks['SpecialListusersHeaderForm'][] = 'ListUsersTestWiki::onSpecialListusersHeaderForm'; |
149 | | -$wgHooks['SpecialListusersQueryInfo'][] = 'ListUsersTestWiki::onSpecialListusersQueryInfo'; |
150 | | -$wgHooks['SpecialListusersHeader'][] = 'ListUsersTestWiki::onSpecialListusersHeader'; |
| 147 | +if( version_compare( $wgVersion, '1.17', '>' ) ) { # doesn't work below 1.18 |
| 148 | + $wgAutoloadClasses['ListUsersTestWiki'] = $dir . 'ListUsersTestWiki.php'; |
| 149 | + $wgHooks['SpecialListusersHeaderForm'][] = 'ListUsersTestWiki::onSpecialListusersHeaderForm'; |
| 150 | + $wgHooks['SpecialListusersQueryInfo'][] = 'ListUsersTestWiki::onSpecialListusersQueryInfo'; |
| 151 | + $wgHooks['SpecialListusersHeader'][] = 'ListUsersTestWiki::onSpecialListusersHeader'; |
| 152 | +} |
\ No newline at end of file |
Index: trunk/extensions/WikimediaIncubator/IncubatorTest.php |
— | — | @@ -379,16 +379,13 @@ |
380 | 380 | |
381 | 381 | /** |
382 | 382 | * This loads language names. Also from CLDR if that extension is found. |
383 | | - * @return Array with language names or empty array |
| 383 | + * @return Array with language names |
384 | 384 | */ |
385 | | - static public function getLanguageNames( $code = '' ) { |
386 | | - if ( is_callable( array( 'LanguageNames', 'getNames' ) ) ) { |
| 385 | + static public function getLanguageNames( $code = null ) { |
| 386 | + if ( is_callable( array( 'Language', 'getTranslatedLanguageNames' ) ) ) { |
387 | 387 | global $wgLang; |
388 | 388 | $langcode = ( $code ? $code : $wgLang->getCode() ); |
389 | | - return LanguageNames::getNames( $langcode, |
390 | | - LanguageNames::FALLBACK_NORMAL, |
391 | | - LanguageNames::LIST_MW_AND_CLDR |
392 | | - ); |
| 389 | + return Language::getTranslatedLanguageNames( $langcode ); |
393 | 390 | } |
394 | 391 | return Language::getLanguageNames( false ); |
395 | 392 | } |