Index: trunk/phase3/languages/LanguageConverter.php |
— | — | @@ -544,26 +544,27 @@ |
545 | 545 | if( $this->mTablesLoaded ) |
546 | 546 | return; |
547 | 547 | $this->mTablesLoaded = true; |
| 548 | + $this->mTables = false; |
548 | 549 | if($fromcache) { |
549 | 550 | $this->mTables = $wgMemc->get( $this->mCacheKey ); |
550 | | - if( !empty( $this->mTables ) ) //all done |
551 | | - return; |
552 | 551 | } |
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 | + } |
562 | 562 | |
563 | | - $this->postLoadTables(); |
| 563 | + $this->postLoadTables(); |
564 | 564 | |
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 | + } |
568 | 569 | } |
569 | 570 | if ( $this->mUseFss ) { |
570 | 571 | $this->generateFssObjects(); |