Index: trunk/extensions/WikimediaIncubator/WikimediaIncubator.php |
— | — | @@ -5,6 +5,8 @@ |
6 | 6 | * for a test wiki system (i.e. incubated wikis inside one actual wiki) |
7 | 7 | * mainly intended for the Wikimedia Incubator |
8 | 8 | * |
| 9 | + * MediaWiki 1.18 or higher required |
| 10 | + * |
9 | 11 | * @file |
10 | 12 | * @ingroup Extensions |
11 | 13 | * @author Robin Pepermans (SPQRobin) |
— | — | @@ -143,9 +145,7 @@ |
144 | 146 | $wgHooks['PageContentLanguage'][] = 'IncubatorTest::onPageContentLanguage'; |
145 | 147 | |
146 | 148 | /* List of users */ |
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 |
| 149 | +$wgAutoloadClasses['ListUsersTestWiki'] = $dir . 'ListUsersTestWiki.php'; |
| 150 | +$wgHooks['SpecialListusersHeaderForm'][] = 'ListUsersTestWiki::onSpecialListusersHeaderForm'; |
| 151 | +$wgHooks['SpecialListusersQueryInfo'][] = 'ListUsersTestWiki::onSpecialListusersQueryInfo'; |
| 152 | +$wgHooks['SpecialListusersHeader'][] = 'ListUsersTestWiki::onSpecialListusersHeader'; |
Index: trunk/extensions/WikimediaIncubator/SpecialRandomByTest.php |
— | — | @@ -20,12 +20,8 @@ |
21 | 21 | $this->extra[] = 'page_title' . |
22 | 22 | $dbr->buildLike( IncubatorTest::displayPrefix( $project, $lang ) . '/', $dbr->anyString() ); |
23 | 23 | } elseif( $wgUser->getOption($wmincPref . '-project') == $wmincProjectSite['short'] ) { |
24 | | - global $wgVersion; |
25 | | - # only works above MW 1.17 |
26 | | - if( version_compare($wgVersion, '1.17', '>') ) { |
27 | | - # project or help namespace |
28 | | - $this->extra['page_namespace'] = array( 4, 12 ); |
29 | | - } |
| 24 | + # project or help namespace |
| 25 | + $this->extra['page_namespace'] = array( 4, 12 ); |
30 | 26 | } |
31 | 27 | parent::__construct( 'RandomByTest' ); |
32 | 28 | } |
Index: trunk/extensions/WikimediaIncubator/IncubatorTest.php |
— | — | @@ -382,12 +382,9 @@ |
383 | 383 | * @return Array with language names |
384 | 384 | */ |
385 | 385 | static public function getLanguageNames( $code = null ) { |
386 | | - if ( is_callable( array( 'Language', 'getTranslatedLanguageNames' ) ) ) { |
387 | | - global $wgLang; |
388 | | - $langcode = ( $code ? $code : $wgLang->getCode() ); |
389 | | - return Language::getTranslatedLanguageNames( $langcode ); |
390 | | - } |
391 | | - return Language::getLanguageNames( false ); |
| 386 | + global $wgLang; |
| 387 | + $langcode = ( $code ? $code : $wgLang->getCode() ); |
| 388 | + return Language::getTranslatedLanguageNames( $langcode ); |
392 | 389 | } |
393 | 390 | |
394 | 391 | /** |