Index: trunk/tools/mwmultiversion/multiversion/MWVersion.php |
— | — | @@ -3,7 +3,8 @@ |
4 | 4 | * Get the location of the correct version of a MediaWiki web |
5 | 5 | * entry-point file given environmental variables such as the server name. |
6 | 6 | * |
7 | | - * This also has some other effects: |
| 7 | + * If the wiki doesn't exist, then the path to missing.php will be returned. |
| 8 | + * If it does, then this function also has some other effects: |
8 | 9 | * (a) Sets the $IP global variable (path to MediaWiki) |
9 | 10 | * (b) Sets the MW_INSTALL_PATH environmental variable |
10 | 11 | * (c) Changes PHP's current directory to the directory of this file. |
— | — | @@ -27,6 +28,12 @@ |
28 | 29 | $multiVersion = MWMultiVersion::initializeForWiki( $serverName, $documentRoot ); |
29 | 30 | } |
30 | 31 | |
| 32 | + # Wiki doesn't exist yet? |
| 33 | + if ( $multiVersion->isMissing() ) { |
| 34 | + header( "Cache-control: no-cache" ); // same hack as CommonSettings.php |
| 35 | + return "/usr/local/apache/common-local/wmf-config/missing.php"; |
| 36 | + } |
| 37 | + |
31 | 38 | # Get the MediaWiki version running on this wiki... |
32 | 39 | $version = $multiVersion->getVersion(); |
33 | 40 | |