r93658 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93657‎ | r93658 | r93659 >
Date:21:19, 1 August 2011
Author:aaron
Status:resolved
Tags:
Comment:
Made MWVersion.php return missing.php for non-wikis for web-entry function. Resolves bug 30156.
Modified paths:
  • /trunk/tools/mwmultiversion/multiversion/MWVersion.php (modified) (history)

Diff [purge]

Index: trunk/tools/mwmultiversion/multiversion/MWVersion.php
@@ -3,7 +3,8 @@
44 * Get the location of the correct version of a MediaWiki web
55 * entry-point file given environmental variables such as the server name.
66 *
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:
89 * (a) Sets the $IP global variable (path to MediaWiki)
910 * (b) Sets the MW_INSTALL_PATH environmental variable
1011 * (c) Changes PHP's current directory to the directory of this file.
@@ -27,6 +28,12 @@
2829 $multiVersion = MWMultiVersion::initializeForWiki( $serverName, $documentRoot );
2930 }
3031
 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+
3138 # Get the MediaWiki version running on this wiki...
3239 $version = $multiVersion->getVersion();
3340

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93634Changes for bug 30156: defer some die() msgs and added isMissing() function f...aaron17:46, 1 August 2011

Status & tagging log