r115398 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r115397‎ | r115398 | r115399 >
Date:09:54, 18 May 2012
Author:hashar
Status:deferred
Tags:
Comment:
comments about the secure gateway
Modified paths:
  • /trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php (modified) (history)

Diff [purge]

Index: trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php
@@ -110,9 +110,14 @@
111111 * @param $docRoot the DocumentRoot for this wiki -- $_SERVER['DOCUMENT_ROOT']
112112 */
113113 private function setSiteInfoForWiki( $serverName, $docRoot ) {
 114+ # The old secure.wikimedia.org gateway, set a specific env variable for us
 115+ # to react differently.
114116 $secure = getenv( 'MW_SECURE_HOST' );
 117+
115118 $matches = array();
116119 if ( $secure ) {
 120+ // secure.wikimedia.org
 121+
117122 if ( !preg_match('/^([^.]+)\.([^.]+)\./', $secure, $matches ) ) {
118123 self::error( "Invalid hostname.\n" );
119124 }
@@ -126,6 +131,8 @@
127132 $site = "wikipedia";
128133 }
129134 } else {
 135+ // Most requests ;)
 136+
130137 $site = "wikipedia";
131138 if ( getenv( 'MW_LANG' ) ) {
132139 # Language forced from some hacky script like extract2.php

Status & tagging log