r90835 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90834‎ | r90835 | r90836 >
Date:15:40, 26 June 2011
Author:nikerabbit
Status:ok (Comments)
Tags:
Comment:
Unbreak multiple maintenance scripts
Modified paths:
  • /trunk/phase3/maintenance/compareParsers.php (modified) (history)
  • /trunk/phase3/maintenance/preprocessDump.php (modified) (history)
  • /trunk/phase3/maintenance/rebuildImages.php (modified) (history)
  • /trunk/phase3/maintenance/upgrade1_5.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/upgrade1_5.php
@@ -1324,4 +1324,4 @@
13251325 }
13261326
13271327 $maintClass = 'FiveUpgrade';
1328 -require( RUN_MAINTENANCE_IF_MAIN );
 1328+require_once( RUN_MAINTENANCE_IF_MAIN );
Index: trunk/phase3/maintenance/preprocessDump.php
@@ -24,7 +24,7 @@
2525 * @file
2626 * @ingroup Maintenance
2727 */
28 -
 28+
2929 require_once( dirname( __FILE__ ) . '/dumpIterator.php' );
3030
3131 class PreprocessDump extends DumpIterator {
@@ -37,7 +37,7 @@
3838 global $wgParser;
3939 return $wgParser->getStripList();
4040 }
41 -
 41+
4242 public function __construct() {
4343 parent::__construct();
4444 $this->addOption( 'cache', 'Use and populate the preprocessor cache.', false, false );
@@ -54,7 +54,7 @@
5555 if ( !$this->hasOption( 'cache' ) ) {
5656 $wgPreprocessorCacheThreshold = false;
5757 }
58 -
 58+
5959 if ( $this->hasOption( 'preprocessor' ) ) {
6060 $name = $this->getOption( 'preprocessor' );
6161 } elseif ( isset( $wgParserConf['preprocessorClass'] ) ) {
@@ -66,7 +66,7 @@
6767 $wgParser->firstCallInit();
6868 $this->mPreprocessor = new $name( $this );
6969 }
70 -
 70+
7171 /**
7272 * Callback function for each revision, preprocessToObj()
7373 * @param $rev Revision
@@ -82,5 +82,5 @@
8383 }
8484
8585 $maintClass = "PreprocessDump";
86 -require( RUN_MAINTENANCE_IF_MAIN );
 86+require_once( RUN_MAINTENANCE_IF_MAIN );
8787
Index: trunk/phase3/maintenance/rebuildImages.php
@@ -219,4 +219,4 @@
220220 }
221221
222222 $maintClass = 'ImageBuilder';
223 -require( RUN_MAINTENANCE_IF_MAIN );
 223+require_once( RUN_MAINTENANCE_IF_MAIN );
Index: trunk/phase3/maintenance/compareParsers.php
@@ -139,4 +139,4 @@
140140 }
141141
142142 $maintClass = "CompareParsers";
143 -require( RUN_MAINTENANCE_IF_MAIN );
 143+require_once( RUN_MAINTENANCE_IF_MAIN );

Follow-up revisions

RevisionCommit summaryAuthorDate
r91530MFT r90835: fixed maintenance scripts broken by require/require_once confusio...tstarling07:17, 6 July 2011
r92348MFT to REL1_18:...hashar08:57, 16 July 2011

Comments

#Comment by Nikerabbit (talk | contribs)   15:40, 26 June 2011

Please backport, these are regressions in 1.17.

Status & tagging log