
hashar at svn
May 18, 2012, 2:54 AM
Views: 47
Permalink
|
|
SVN: [115398] trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php
|
|
https://www.mediawiki.org/wiki/Special:Code/MediaWiki/115398 Revision: 115398 Author: hashar Date: 2012-05-18 09:54:44 +0000 (Fri, 18 May 2012) Log Message: ----------- comments about the secure gateway Modified Paths: -------------- trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php Modified: trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php =================================================================== --- trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php 2012-05-18 03:34:30 UTC (rev 115397) +++ trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php 2012-05-18 09:54:44 UTC (rev 115398) @@ -110,9 +110,14 @@ * @param $docRoot the DocumentRoot for this wiki -- $_SERVER['DOCUMENT_ROOT'] */ private function setSiteInfoForWiki( $serverName, $docRoot ) { + # The old secure.wikimedia.org gateway, set a specific env variable for us + # to react differently. $secure = getenv( 'MW_SECURE_HOST' ); + $matches = array(); if ( $secure ) { + // secure.wikimedia.org + if ( !preg_match('/^([^.]+)\.([^.]+)\./', $secure, $matches ) ) { self::error( "Invalid hostname.\n" ); } @@ -126,6 +131,8 @@ $site = "wikipedia"; } } else { + // Most requests ;) + $site = "wikipedia"; if ( getenv( 'MW_LANG' ) ) { # Language forced from some hacky script like extract2.php _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS [at] lists https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
|