r93242 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93241‎ | r93242 | r93243 >
Date:20:19, 26 July 2011
Author:aaron
Status:ok (Comments)
Tags:
Comment:
merged more updates. Ugly class_exists() won't be there forever, but require_once() didn't work right.
Modified paths:
  • /trunk/tools/mwmultiversion/wmf-config/CommonSettings.php (modified) (history)

Diff [purge]

Index: trunk/tools/mwmultiversion/wmf-config/CommonSettings.php
@@ -47,11 +47,13 @@
4848 die( "No MWMultiVersion instance initialized! Wrapper not used?" );
4949 }
5050 */
51 -if ( !isset( $IP ) && php_sapi_name() == 'cli' ) {
 51+if ( !class_exists( 'MWMultiVersion' ) && php_sapi_name() == 'cli' ) {
 52+ global $argv;
5253 # Allow for now since everything is 1.17 and we don't want scripts to break
5354 require_once( dirname( __FILE__ ) . "/../multiversion/MWMultiVersion.php" );
54 - $multiVersion = MWMultiVersion::initializeForMaintenance();
55 - echo "MWVersion wrapper not used!\n";
 55+ array_unshift( $argv, 'rein' ); // HACK for maintenance.php stripping argv[0]
 56+ MWMultiVersion::initializeForMaintenance();
 57+ array_shift( $argv ); // HACK for maintenance.php stripping argv[0]
5658 }
5759
5860 # Get the version object for this Wiki (must be set by now, along with $IP)

Comments

#Comment by Aaron Schulz (talk | contribs)   20:23, 26 July 2011

Probably can get rid of this file soon hopefully.

Status & tagging log