r93670 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93669‎ | r93670 | r93671 >
Date:22:53, 1 August 2011
Author:aaron
Status:ok
Tags:
Comment:
fix for robots.php hits on bogus wikis
Modified paths:
  • /trunk/tools/mwmultiversion/multiversion/MWVersion.php (modified) (history)

Diff [purge]

Index: trunk/tools/mwmultiversion/multiversion/MWVersion.php
@@ -2,8 +2,11 @@
33 /**
44 * Get the location of the correct version of a MediaWiki web
55 * entry-point file given environmental variables such as the server name.
 6+ * This function should only be called on web views.
67 *
7 - * If the wiki doesn't exist, then the path to missing.php will be returned.
 8+ * If the wiki doesn't exist, then wmf-config/missing.php will
 9+ * be included (and thus displayed) and PHP will exit.
 10+ *
811 * If it does, then this function also has some other effects:
912 * (a) Sets the $IP global variable (path to MediaWiki)
1013 * (b) Sets the MW_INSTALL_PATH environmental variable
@@ -31,7 +34,8 @@
3235 # Wiki doesn't exist yet?
3336 if ( $multiVersion->isMissing() ) {
3437 header( "Cache-control: no-cache" ); // same hack as CommonSettings.php
35 - return "/usr/local/apache/common-local/wmf-config/missing.php";
 38+ include( "/usr/local/apache/common-local/wmf-config/missing.php" );
 39+ exit;
3640 }
3741
3842 # Get the MediaWiki version running on this wiki...

Status & tagging log