r14621 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14620‎ | r14621 | r14622 >
Date:22:08, 6 June 2006
Author:brion
Status:old
Tags:
Comment:
Fix the converter tests; the language object doesn't seem to set up the converter properly otherwise
Modified paths:
  • /trunk/phase3/maintenance/parserTests.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.inc
@@ -320,8 +320,6 @@
321321 } else {
322322 $lang = 'en';
323323 }
324 - $langClass = 'Language' . str_replace( '-', '_', ucfirst( $lang ) );
325 - $langObj = setupLangObj( $langClass );
326324
327325 $settings = array(
328326 'wgServer' => 'http://localhost',
@@ -339,8 +337,8 @@
340338 'wgDBprefix' => 'parsertest_',
341339 'wgDefaultUserOptions' => array(),
342340
343 - 'wgLang' => $langObj,
344 - 'wgContLang' => $langObj,
 341+ 'wgLang' => null,
 342+ 'wgContLang' => null,
345343 'wgNamespacesWithSubpages' => array( 0 => preg_match('/\\bsubpage\\b/i', $opts)),
346344 'wgMaxTocLevel' => 999,
347345 'wgCapitalLinks' => true,
@@ -355,6 +353,11 @@
356354 $this->savedGlobals[$var] = $GLOBALS[$var];
357355 $GLOBALS[$var] = $val;
358356 }
 357+ $langClass = 'Language' . str_replace( '-', '_', ucfirst( $lang ) );
 358+ $langObj = setupLangObj( $langClass );
 359+ $GLOBALS['wgLang'] = $langObj;
 360+ $GLOBALS['wgContLang'] = $langObj;
 361+
359362 $GLOBALS['wgLoadBalancer']->loadMasterPos();
360363 $GLOBALS['wgMessageCache']->initialise( new BagOStuff(), false, 0, $GLOBALS['wgDBname'] );
361364 $this->setupDatabase();

Status & tagging log