From: Tim Starling Date: Mon, 3 Dec 2007 04:54:28 +0000 (+0000) Subject: Bump translation table cache version, since new tables have been added. Generates... X-Git-Tag: 1.31.0-rc.0~50601 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=c2178d0a11d29075363a87bed1e7da2747e403b6;p=lhc%2Fweb%2Fwiklou.git Bump translation table cache version, since new tables have been added. Generates fatal errors if not done. --- diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php index 43f33ae68b..c4aa8bc608 100644 --- a/languages/LanguageConverter.php +++ b/languages/LanguageConverter.php @@ -20,6 +20,9 @@ class LanguageConverter { var $mMarkup; var $mFlags; var $mUcfirst = false; + + const CACHE_VERSION_KEY = 'VERSION 3'; + /** * Constructor * @@ -615,7 +618,7 @@ class LanguageConverter { $this->mTables = $wgMemc->get( $this->mCacheKey ); wfProfileOut( __METHOD__.'-cache' ); } - if ( !$this->mTables || !isset( $this->mTables['VERSION 2'] ) ) { + if ( !$this->mTables || !isset( $this->mTables[self::CACHE_VERSION_KEY] ) ) { wfProfileIn( __METHOD__.'-recache' ); // not in cache, or we need a fresh reload. // we will first load the default tables @@ -627,7 +630,7 @@ class LanguageConverter { } $this->postLoadTables(); - $this->mTables['VERSION 2'] = true; + $this->mTables[self::CACHE_VERSION_KEY] = true; if($this->lockCache()) { $wgMemc->set($this->mCacheKey, $this->mTables, 43200);