Index: trunk/extensions/SiteMatrix/SiteMatrix_body.php |
— | — | @@ -255,10 +255,11 @@ |
256 | 256 | $matrix = new SiteMatrix(); |
257 | 257 | |
258 | 258 | $db = $wgDBname; |
259 | | - $lang = $wgLanguageCode; |
260 | | - if ( strpos( $wgDBname, $wgLanguageCode ) == 0 ) { |
| 259 | + $lang = ''; |
| 260 | + //Strip language from DB name, if existent it should be at the start |
| 261 | + if ( strpos( $wgDBname, $wgLanguageCode ) === 0 ) { |
261 | 262 | $db = str_replace( $wgLanguageCode, '', $wgDBname ); |
262 | | - $lang = ''; |
| 263 | + $lang = $wgLanguageCode; |
263 | 264 | } |
264 | 265 | |
265 | 266 | if ( $matrix->isClosed( $lang, $db ) ) { |