Index: trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php |
— | — | @@ -152,9 +152,11 @@ |
153 | 153 | # The --wiki param must the second argument to to avoid |
154 | 154 | # any "options with args" ambiguity (see Maintenance.php). |
155 | 155 | if ( isset( $argv[1] ) && $argv[1] === '--wiki' ) { |
156 | | - $dbname = isset( $argv[2] ) ? $argv[2] : ''; |
| 156 | + $dbname = isset( $argv[2] ) ? $argv[2] : ''; // "script.php --wiki dbname" |
157 | 157 | } elseif ( isset( $argv[1] ) && substr( $argv[1], 0, 7 ) === '--wiki=' ) { |
158 | | - $dbname = substr( $argv[1], 7 ); |
| 158 | + $dbname = substr( $argv[1], 7 ); // "script.php --wiki=dbname" |
| 159 | + } elseif ( isset( $argv[1] )&& substr( $argv[1], 0, 2 ) !== '--' ) { |
| 160 | + $dbname = $argv[1]; // "script.php dbname" |
159 | 161 | } elseif ( $argv[0] === 'addwiki.php' ) { |
160 | 162 | # Most scripts assume that the wiki already exists. addwiki.php is |
161 | 163 | # obviously an exception. Go ahead and assumme aawiki as normal. |