Index: trunk/phase3/maintenance/parserTests.inc |
— | — | @@ -320,8 +320,6 @@ |
321 | 321 | } else { |
322 | 322 | $lang = 'en'; |
323 | 323 | } |
324 | | - $langClass = 'Language' . str_replace( '-', '_', ucfirst( $lang ) ); |
325 | | - $langObj = setupLangObj( $langClass ); |
326 | 324 | |
327 | 325 | $settings = array( |
328 | 326 | 'wgServer' => 'http://localhost', |
— | — | @@ -339,8 +337,8 @@ |
340 | 338 | 'wgDBprefix' => 'parsertest_', |
341 | 339 | 'wgDefaultUserOptions' => array(), |
342 | 340 | |
343 | | - 'wgLang' => $langObj, |
344 | | - 'wgContLang' => $langObj, |
| 341 | + 'wgLang' => null, |
| 342 | + 'wgContLang' => null, |
345 | 343 | 'wgNamespacesWithSubpages' => array( 0 => preg_match('/\\bsubpage\\b/i', $opts)), |
346 | 344 | 'wgMaxTocLevel' => 999, |
347 | 345 | 'wgCapitalLinks' => true, |
— | — | @@ -355,6 +353,11 @@ |
356 | 354 | $this->savedGlobals[$var] = $GLOBALS[$var]; |
357 | 355 | $GLOBALS[$var] = $val; |
358 | 356 | } |
| 357 | + $langClass = 'Language' . str_replace( '-', '_', ucfirst( $lang ) ); |
| 358 | + $langObj = setupLangObj( $langClass ); |
| 359 | + $GLOBALS['wgLang'] = $langObj; |
| 360 | + $GLOBALS['wgContLang'] = $langObj; |
| 361 | + |
359 | 362 | $GLOBALS['wgLoadBalancer']->loadMasterPos(); |
360 | 363 | $GLOBALS['wgMessageCache']->initialise( new BagOStuff(), false, 0, $GLOBALS['wgDBname'] ); |
361 | 364 | $this->setupDatabase(); |