Index: trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php |
— | — | @@ -101,7 +101,10 @@ |
102 | 102 | } |
103 | 103 | } else { |
104 | 104 | $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 ) ) { |
106 | 109 | $site = $matches[1]; |
107 | 110 | if ( preg_match( '/^(.*)\.' . preg_quote( $site ) . '\.org$/', $serverName, $matches ) ) { |
108 | 111 | $lang = $matches[1]; |