Index: trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php |
— | — | @@ -169,11 +169,6 @@ |
170 | 170 | $dbname = substr( $argv[1], 7 ); // "script.php --wiki=dbname" |
171 | 171 | } elseif ( isset( $argv[1] ) && substr( $argv[1], 0, 2 ) !== '--' ) { |
172 | 172 | $dbname = $argv[1]; // "script.php dbname" |
173 | | - } elseif ( in_array( $argv[0], self::wikilessScripts() ) ) { |
174 | | - # For addwiki.php, the DB doesn't yet exist, and for nextJobDB.php |
175 | | - # we don't care what DB we use. Assumme aawiki as Maintenance.php does. |
176 | | - $dbname = 'aawiki'; |
177 | | - $argv = array_merge( array( $argv[0], "--wiki=$dbname" ), array_slice( $argv, 1 ) ); |
178 | 173 | } |
179 | 174 | |
180 | 175 | if ( $dbname === '' ) { |
— | — | @@ -189,7 +184,7 @@ |
190 | 185 | * @return Array |
191 | 186 | */ |
192 | 187 | private static function wikilessScripts() { |
193 | | - return array( 'addwiki.php', 'nextJobDB.php', 'mergeMessageFileList.php' ); |
| 188 | + return array( 'addwiki.php', 'nextJobDB.php' ); |
194 | 189 | } |
195 | 190 | |
196 | 191 | /** |
Index: trunk/tools/mwmultiversion/multiversion/MWScript.php |
— | — | @@ -36,6 +36,18 @@ |
37 | 37 | $argv[0] = $matches[1]; // make first arg the script file name |
38 | 38 | } |
39 | 39 | |
| 40 | + # For addwiki.php, the wiki DB doesn't yet exist, and for some |
| 41 | + # other maintenance scripts we don't care what wiki DB is used... |
| 42 | + $wikiless = array( |
| 43 | + 'maintenance/mctest.php', |
| 44 | + 'maintenance/addwiki.php', |
| 45 | + 'maintenance/nextJobDB.php' |
| 46 | + ); |
| 47 | + if ( in_array( $relFile, $wikiless ) ) { |
| 48 | + # Assumme aawiki as Maintenance.php does. |
| 49 | + $argv = array_merge( array( $argv[0], "--wiki=aawiki" ), array_slice( $argv, 1 ) ); |
| 50 | + }; |
| 51 | + |
40 | 52 | # MWScript.php should be in common/ |
41 | 53 | require_once( dirname( __FILE__ ) . '/MWVersion.php' ); |
42 | 54 | $file = getMediaWikiCli( $relFile ); |