Index: trunk/extensions/SiteMatrix/SiteMatrix_body.php |
— | — | @@ -250,19 +250,13 @@ |
251 | 251 | * @return void |
252 | 252 | */ |
253 | 253 | public static function APIQuerySiteInfoGeneralInfo( $module, $results ) { |
254 | | - global $wgDBname, $wgLanguageCode; |
| 254 | + global $wgDBname, $wgConf; |
255 | 255 | |
256 | 256 | $matrix = new SiteMatrix(); |
257 | 257 | |
258 | | - $db = $wgDBname; |
259 | | - $lang = ''; |
260 | | - //Strip language from DB name, if existent it should be at the start |
261 | | - if ( strpos( $wgDBname, $wgLanguageCode ) === 0 ) { |
262 | | - $db = str_replace( $wgLanguageCode, '', $wgDBname ); |
263 | | - $lang = $wgLanguageCode; |
264 | | - } |
| 258 | + list( $site, $lang ) = $wgConf->siteFromDB( $wgDBname ); |
265 | 259 | |
266 | | - if ( $matrix->isClosed( $lang, $db ) ) { |
| 260 | + if ( $matrix->isClosed( $lang, $site ) ) { |
267 | 261 | $results['closed'] = ''; |
268 | 262 | } |
269 | 263 | |