r93138 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93137‎ | r93138 | r93139 >
Date:22:55, 25 July 2011
Author:aaron
Status:ok
Tags:
Comment:
Made setSiteInfoForWiki() check a new MW_LANG env variable (for use by extract2.php)
Modified paths:
  • /trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php (modified) (history)

Diff [purge]

Index: trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php
@@ -101,7 +101,10 @@
102102 }
103103 } else {
104104 $site = "wikipedia";
105 - if ( preg_match( '/^(?:\/usr\/local\/apache\/|\/home\/wikipedia\/)(?:htdocs|common\/docroot)\/([a-z]+)\.org/', $docRoot, $matches ) ) {
 105+ if ( getenv( 'MW_LANG' ) ) {
 106+ # Language forced from some hacky script like extract2.php
 107+ $lang = getenv( 'MW_LANG' );
 108+ } elseif ( preg_match( '/^(?:\/usr\/local\/apache\/|\/home\/wikipedia\/)(?:htdocs|common\/docroot)\/([a-z]+)\.org/', $docRoot, $matches ) ) {
106109 $site = $matches[1];
107110 if ( preg_match( '/^(.*)\.' . preg_quote( $site ) . '\.org$/', $serverName, $matches ) ) {
108111 $lang = $matches[1];

Status & tagging log