r96141 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96140‎ | r96141 | r96142 >
Date:19:20, 2 September 2011
Author:robin
Status:ok
Tags:
Comment:
Drop support for 1.17 and below, as version_compare() doesn't work properly and 1.18 will be deployed to wmf wikis soon anyway.
Modified paths:
  • /trunk/extensions/WikimediaIncubator/IncubatorTest.php (modified) (history)
  • /trunk/extensions/WikimediaIncubator/SpecialRandomByTest.php (modified) (history)
  • /trunk/extensions/WikimediaIncubator/WikimediaIncubator.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikimediaIncubator/WikimediaIncubator.php
@@ -5,6 +5,8 @@
66 * for a test wiki system (i.e. incubated wikis inside one actual wiki)
77 * mainly intended for the Wikimedia Incubator
88 *
 9+ * MediaWiki 1.18 or higher required
 10+ *
911 * @file
1012 * @ingroup Extensions
1113 * @author Robin Pepermans (SPQRobin)
@@ -143,9 +145,7 @@
144146 $wgHooks['PageContentLanguage'][] = 'IncubatorTest::onPageContentLanguage';
145147
146148 /* 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 @@
2121 $this->extra[] = 'page_title' .
2222 $dbr->buildLike( IncubatorTest::displayPrefix( $project, $lang ) . '/', $dbr->anyString() );
2323 } 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 );
3026 }
3127 parent::__construct( 'RandomByTest' );
3228 }
Index: trunk/extensions/WikimediaIncubator/IncubatorTest.php
@@ -382,12 +382,9 @@
383383 * @return Array with language names
384384 */
385385 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 );
392389 }
393390
394391 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r105776MFT for WikimediaIncubator: r95582, r96122, r96138, r96141, r97175, r98670, r...siebrand00:32, 11 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96138* Call core function Language::getTranslatedLanguageName() if found, instead ...robin18:18, 2 September 2011

Status & tagging log