Index: trunk/tools/mwmultiversion/multiversion/MWScript.php |
— | — | @@ -48,11 +48,16 @@ |
49 | 49 | 'extensions/WikimediaMaintenance/dumpInterwiki.php', // 1.19 |
50 | 50 | 'extensions/WikimediaMaintenance/rebuildInterwiki.php' // 1.19 |
51 | 51 | ); |
52 | | - if ( in_array( $relFile, $wikiless ) ) { |
53 | | - # Assumme aawiki as Maintenance.php does. |
54 | | - $argv = array_merge( array( $argv[0], "--wiki=aawiki" ), array_slice( $argv, 1 ) ); |
55 | | - }; |
56 | 52 | |
| 53 | + # Check if a --wiki param was given... |
| 54 | + # Maintenance.php will treat $argv[1] as the wiki if it doesn't start '-' |
| 55 | + if ( !isset( $argv[1] ) || !preg_match( '/^([^-]|--wiki(=|$))/', $argv[1] ) ) { |
| 56 | + if ( in_array( $relFile, $wikiless ) ) { |
| 57 | + # Assumme aawiki as Maintenance.php does. |
| 58 | + $argv = array_merge( array( $argv[0], "--wiki=aawiki" ), array_slice( $argv, 1 ) ); |
| 59 | + } |
| 60 | + } |
| 61 | + |
57 | 62 | # MWScript.php should be in common/ |
58 | 63 | require_once( dirname( __FILE__ ) . '/MWVersion.php' ); |
59 | 64 | $file = getMediaWikiCli( $relFile ); |