r112337 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112336‎ | r112337 | r112338 >
Date:18:24, 24 February 2012
Author:aaron
Status:ok (Comments)
Tags:
Comment:
Check if /home is mounted for testwiki
Modified paths:
  • /trunk/tools/mwmultiversion/multiversion/MWVersion.php (modified) (history)

Diff [purge]

Index: trunk/tools/mwmultiversion/multiversion/MWVersion.php
@@ -47,8 +47,9 @@
4848
4949 # Get the correct MediaWiki path based on this version...
5050 if ( $host === 'test.wikipedia.org' && !$secure &&
51 - !preg_match( '!thumb\.php!', $_SERVER['REQUEST_URI'] ) )
52 - {
 51+ !preg_match( '!thumb\.php!', $_SERVER['REQUEST_URI'] ) &&
 52+ is_dir( MULTIVER_COMMON_HOME . "/$version" ) // home mounted
 53+ ) {
5354 define( 'TESTWIKI', 1 );
5455 # Test wiki mostly runs off the version of MediaWiki on /home.
5556 # As horrible hack for NFS-less image scalers, use regular docroot for thumbs?

Comments

#Comment by Hashar (talk | contribs)   10:53, 29 February 2012

Shouldn't we just abort in such case instead of fallbacking to the deployed version?

Status & tagging log