r17041 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17040‎ | r17041 | r17042 >
Date:02:36, 16 October 2006
Author:tstarling
Status:old
Tags:
Comment:
fix FSS-related bug
Modified paths:
  • /trunk/phase3/languages/LanguageConverter.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/LanguageConverter.php
@@ -544,26 +544,27 @@
545545 if( $this->mTablesLoaded )
546546 return;
547547 $this->mTablesLoaded = true;
 548+ $this->mTables = false;
548549 if($fromcache) {
549550 $this->mTables = $wgMemc->get( $this->mCacheKey );
550 - if( !empty( $this->mTables ) ) //all done
551 - return;
552551 }
553 - // not in cache, or we need a fresh reload.
554 - // we will first load the default tables
555 - // then update them using things in MediaWiki:Zhconversiontable/*
556 - global $wgMessageCache;
557 - $this->loadDefaultTables();
558 - foreach($this->mVariants as $var) {
559 - $cached = $this->parseCachedTable($var);
560 - $this->mTables[$var] = array_merge($this->mTables[$var], $cached);
561 - }
 552+ if ( !$this->mTables ) {
 553+ // not in cache, or we need a fresh reload.
 554+ // we will first load the default tables
 555+ // then update them using things in MediaWiki:Zhconversiontable/*
 556+ global $wgMessageCache;
 557+ $this->loadDefaultTables();
 558+ foreach($this->mVariants as $var) {
 559+ $cached = $this->parseCachedTable($var);
 560+ $this->mTables[$var] = array_merge($this->mTables[$var], $cached);
 561+ }
562562
563 - $this->postLoadTables();
 563+ $this->postLoadTables();
564564
565 - if($this->lockCache()) {
566 - $wgMemc->set($this->mCacheKey, $this->mTables, 43200);
567 - $this->unlockCache();
 565+ if($this->lockCache()) {
 566+ $wgMemc->set($this->mCacheKey, $this->mTables, 43200);
 567+ $this->unlockCache();
 568+ }
568569 }
569570 if ( $this->mUseFss ) {
570571 $this->generateFssObjects();