r82094 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82093‎ | r82094 | r82095 >
Date:23:25, 13 February 2011
Author:reedy
Status:deferred
Tags:
Comment:
Kill some ancient old version checks (ie 1.11, 1.12, 1.13)
Modified paths:
  • /trunk/extensions/ContributionScores/ContributionScores.php (modified) (history)
  • /trunk/extensions/DumpHTML/dumpHTML.php (modified) (history)
  • /trunk/extensions/DynamicPageList/DPLSetup.php (modified) (history)
  • /trunk/extensions/News/NewsRenderer.php (modified) (history)
  • /trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ContributionScores/ContributionScores.php
@@ -30,11 +30,9 @@
3131 $wgSpecialPages['ContributionScores'] = 'ContributionScores';
3232 $wgSpecialPageGroups['ContributionScores'] = 'wiki';
3333
34 -if( version_compare( $wgVersion, '1.13', '>=' ) ) {
35 - $wgExtensionMessagesFiles['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores.i18n.php';
36 - $wgExtensionAliasesFiles['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores.alias.php';
37 - $wgExtensionMessagesFiles['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores.i18n.php';
38 -}
 34+$wgExtensionMessagesFiles['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores.i18n.php';
 35+$wgExtensionAliasesFiles['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores.alias.php';
 36+$wgExtensionMessagesFiles['ContributionScores'] = CONTRIBUTIONSCORES_PATH . '/ContributionScores.i18n.php';
3937
4038 $wgHooks['LanguageGetMagic'][] = 'efContributionScores_LanguageGetMagic';
4139
Index: trunk/extensions/News/NewsRenderer.php
@@ -557,18 +557,6 @@
558558
559559 if ( $params === null ) $params = array();
560560 $text = $parser->replaceVariables( $text, $params );
561 -
562 - /*
563 - if ( version_compare( $wgVersion, "1.12", '<' ) ) {
564 - }
565 - else {
566 - $parser = $GLOBALS['wgParser'];
567 -
568 - $frame = $parser->getPreprocessor()->newCustomFrame($params);
569 - $text = $parser->replaceVariables( $text, $frame );
570 - }
571 - */
572 -
573561 return $text;
574562 }
575563
Index: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php
@@ -187,11 +187,8 @@
188188
189189 # Attach Hooks
190190 $wgHooks['OutputPageBeforeHTML'][] = 'wfAddWikiFeedHeaders';
191 -if ( version_compare( $wgVersion, '1.13', '>=' ) ) {
192 - $wgHooks['SkinTemplateToolboxEnd'][] = 'wfWikiArticleFeedsToolboxLinks'; // introduced in 1.13
193 -} else {
194 - $wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfWikiArticleFeedsToolboxLinks';
195 -}
 191+$wgHooks['SkinTemplateToolboxEnd'][] = 'wfWikiArticleFeedsToolboxLinks'; // introduced in 1.13
 192+
196193 $wgHooks['UnknownAction'][] = 'wfWikiArticleFeedsAction';
197194 $wgHooks['ArticlePurge'][] = 'wfPurgeFeedsOnArticlePurge';
198195
Index: trunk/extensions/DumpHTML/dumpHTML.php
@@ -63,12 +63,6 @@
6464 require_once( dirname(__FILE__)."/dumpHTML.inc" );
6565 require_once( dirname(__FILE__)."/SkinOffline.php" );
6666
67 -if ( version_compare( $wgVersion, '1.11.1', '<' ) ) {
68 - echo "Error, the DumpHTML extension needs at least MediaWiki version 1.11.1 to work, you have version $wgVersion.\n";
69 - echo "Try using maintenance/dumpHTML.php instead.\n";
70 - exit;
71 -}
72 -
7367 error_reporting( E_ALL & (~E_NOTICE) );
7468
7569 if( isset( $options['help'] ) || isset( $options['h'] ) ) {
Index: trunk/extensions/DynamicPageList/DPLSetup.php
@@ -1350,10 +1350,7 @@
13511351 // return $dump1.$text.$dump2;
13521352
13531353 $dplresult = DPLMain::dynamicPageList( $input, $params, $parser, $reset, 'func' );
1354 - global $wgVersion;
1355 - if ( version_compare( $wgVersion, '1.12.0' ) < 0 || $parser instanceof Parser_OldPP ) {
1356 - return $dplresult;
1357 - }
 1354+
13581355 // old parser does further recursive processing by default
13591356 return array( // normal parser needs to be coaxed to do further recursive processing
13601357 $parser->getPreprocessor()->preprocessToObj( $dplresult, Parser::PTD_FOR_INCLUSION ),

Status & tagging log