dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add option to expose original sha1 in thumb url"
[lhc/web/wiklou.git]
/
includes
/
cache
/
LocalisationCache.php
diff --git
a/includes/cache/LocalisationCache.php
b/includes/cache/LocalisationCache.php
index
dc5a2eb
..
f5b2350
100644
(file)
--- a/
includes/cache/LocalisationCache.php
+++ b/
includes/cache/LocalisationCache.php
@@
-23,6
+23,7
@@
use Cdb\Exception as CdbException;
use Cdb\Reader as CdbReader;
use Cdb\Writer as CdbWriter;
use Cdb\Exception as CdbException;
use Cdb\Reader as CdbReader;
use Cdb\Writer as CdbWriter;
+use CLDRPluralRuleParser\Evaluator;
/**
* Class for caching the contents of localisation files, Messages*.php
/**
* Class for caching the contents of localisation files, Messages*.php
@@
-204,6
+205,9
@@
class LocalisationCache {
case 'db':
$storeClass = 'LCStoreDB';
break;
case 'db':
$storeClass = 'LCStoreDB';
break;
+ case 'array':
+ $storeClass = 'LCStoreStaticArray';
+ break;
case 'detect':
$storeClass = $wgCacheDirectory ? 'LCStoreCDB' : 'LCStoreDB';
break;
case 'detect':
$storeClass = $wgCacheDirectory ? 'LCStoreCDB' : 'LCStoreDB';
break;
@@
-506,15
+510,15
@@
class LocalisationCache {
*/
protected function readPHPFile( $_fileName, $_fileType ) {
// Disable APC caching
*/
protected function readPHPFile( $_fileName, $_fileType ) {
// Disable APC caching
-
wfS
uppressWarnings();
+
MediaWiki\s
uppressWarnings();
$_apcEnabled = ini_set( 'apc.cache_by_default', '0' );
$_apcEnabled = ini_set( 'apc.cache_by_default', '0' );
-
wfR
estoreWarnings();
+
MediaWiki\r
estoreWarnings();
include $_fileName;
include $_fileName;
-
wfS
uppressWarnings();
+
MediaWiki\s
uppressWarnings();
ini_set( 'apc.cache_by_default', $_apcEnabled );
ini_set( 'apc.cache_by_default', $_apcEnabled );
-
wfR
estoreWarnings();
+
MediaWiki\r
estoreWarnings();
if ( $_fileType == 'core' || $_fileType == 'extension' ) {
$data = compact( self::$allKeys );
if ( $_fileType == 'core' || $_fileType == 'extension' ) {
$data = compact( self::$allKeys );
@@
-536,13
+540,11
@@
class LocalisationCache {
public function readJSONFile( $fileName ) {
if ( !is_readable( $fileName ) ) {
public function readJSONFile( $fileName ) {
if ( !is_readable( $fileName ) ) {
-
return array();
}
$json = file_get_contents( $fileName );
if ( $json === false ) {
return array();
}
$json = file_get_contents( $fileName );
if ( $json === false ) {
-
return array();
}
return array();
}
@@
-575,7
+577,7
@@
class LocalisationCache {
return null;
}
try {
return null;
}
try {
- $compiledRules =
CLDRPluralRule
Evaluator::compile( $rules );
+ $compiledRules = Evaluator::compile( $rules );
} catch ( CLDRPluralRuleError $e ) {
wfDebugLog( 'l10n', $e->getMessage() );
} catch ( CLDRPluralRuleError $e ) {
wfDebugLog( 'l10n', $e->getMessage() );