Index: trunk/tools/mwmultiversion/multiversion/MWScript.php |
— | — | @@ -17,9 +17,9 @@ |
18 | 18 | * Also, $argv[1] (the script path) will be changed to the script file name. |
19 | 19 | * All other arguments will be preserved. |
20 | 20 | * |
21 | | - * @return void |
| 21 | + * @return string Absolute MediaWiki script path |
22 | 22 | */ |
23 | | -function runMWScript() { |
| 23 | +function getMWScriptWithArgs() { |
24 | 24 | global $argv; |
25 | 25 | if ( count( $argv ) < 2 ) { |
26 | 26 | die( "The MediaWiki script file path must be the first argument.\n" ); |
— | — | @@ -45,8 +45,8 @@ |
46 | 46 | die( "The MediaWiki script file \"{$file}\" does not exist.\n" ); |
47 | 47 | } |
48 | 48 | |
49 | | - # Run the script! (for HipHip, we will need to shell out here) |
50 | | - require_once( $file ); |
| 49 | + return $file; |
51 | 50 | } |
52 | 51 | |
53 | | -runMWScript(); |
| 52 | +# Run the script! (for HipHip, we will need to shell out here) |
| 53 | +require_once( getMWScriptWithArgs() ); |