X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FLocalisationCache.php;h=3b1f45cc16b75aad1cda3ae04bffb71dab68eb56;hb=fc6bc233be34a7e401d4beb74233b8d363dfc78e;hp=aaa0245e484e8492f04842f93d05f73a7dcb05bf;hpb=2d1ccd9ba1370c0cbb558b9ee9448e421ea44993;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/LocalisationCache.php b/includes/LocalisationCache.php index aaa0245e48..3b1f45cc16 100644 --- a/includes/LocalisationCache.php +++ b/includes/LocalisationCache.php @@ -163,12 +163,7 @@ class LocalisationCache { $storeClass = 'LCStore_Accel'; break; case 'detect': - try { - $c = wfGetCache( CACHE_ACCEL ); - $storeClass = 'LCStore_Accel'; - } catch( Exception $c ) { - $storeClass = $wgCacheDirectory ? 'LCStore_CDB' : 'LCStore_DB'; - } + $storeClass = $wgCacheDirectory ? 'LCStore_CDB' : 'LCStore_DB'; break; default: throw new MWException( @@ -215,7 +210,7 @@ class LocalisationCache { * need to fetch all of the subitems from the cache individually. * @param $code * @param $key - * @return string + * @return mixed */ public function getItem( $code, $key ) { if ( !isset( $this->loadedItems[$code][$key] ) ) { @@ -553,7 +548,7 @@ class LocalisationCache { * @param $code */ public function recache( $code ) { - global $wgExtensionMessagesFiles, $wgExtensionAliasesFiles; + global $wgExtensionMessagesFiles; wfProfileIn( __METHOD__ ); if ( !$code ) { @@ -648,22 +643,6 @@ class LocalisationCache { } } - # Load deprecated $wgExtensionAliasesFiles - foreach ( $wgExtensionAliasesFiles as $fileName ) { - $data = $this->readPHPFile( $fileName, 'aliases' ); - - if ( !isset( $data['aliases'] ) ) { - continue; - } - - $used = $this->mergeExtensionItem( $codeSequence, 'specialPageAliases', - $allData['specialPageAliases'], $data['aliases'] ); - - if ( $used ) { - $deps[] = new FileDependency( $fileName ); - } - } - # Merge core data into extension data foreach ( $coreData as $key => $item ) { $this->mergeItem( $key, $allData[$key], $item ); @@ -671,7 +650,6 @@ class LocalisationCache { # Add cache dependencies for any referenced globals $deps['wgExtensionMessagesFiles'] = new GlobalDependency( 'wgExtensionMessagesFiles' ); - $deps['wgExtensionAliasesFiles'] = new GlobalDependency( 'wgExtensionAliasesFiles' ); $deps['version'] = new ConstantDependency( 'MW_LC_VERSION' ); # Add dependencies to the cache entry @@ -842,7 +820,7 @@ interface LCStore { /** * LCStore implementation which uses PHP accelerator to store data. - * This will work if one of XCache, eAccelerator, or APC cacher is configured. + * This will work if one of XCache, WinCache or APC cacher is configured. * (See ObjectCache.php) */ class LCStore_Accel implements LCStore { @@ -1137,7 +1115,7 @@ class LocalisationCache_BulkLoad extends LocalisationCache { /** * @param $code * @param $key - * @return string + * @return mixed */ public function getItem( $code, $key ) { unset( $this->mruLangs[$code] );