diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:15:42 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:44:51 +0100 |
commit | a1789ddde42033f1b05cc4929491214ee6e79383 (patch) | |
tree | 63615735c4ddffaaabf2428946bb26f90899f7bf /includes/cache/LocalisationCache.php | |
parent | 9e06a62f265e3a2aaabecc598d4bc617e06fa32d (diff) |
Update to MediaWiki 1.26.0
Diffstat (limited to 'includes/cache/LocalisationCache.php')
-rw-r--r-- | includes/cache/LocalisationCache.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/includes/cache/LocalisationCache.php b/includes/cache/LocalisationCache.php index dc5a2eb6..276e84aa 100644 --- a/includes/cache/LocalisationCache.php +++ b/includes/cache/LocalisationCache.php @@ -204,6 +204,9 @@ class LocalisationCache { case 'db': $storeClass = 'LCStoreDB'; break; + case 'array': + $storeClass = 'LCStoreStaticArray'; + break; case 'detect': $storeClass = $wgCacheDirectory ? 'LCStoreCDB' : 'LCStoreDB'; break; @@ -506,15 +509,15 @@ class LocalisationCache { */ protected function readPHPFile( $_fileName, $_fileType ) { // Disable APC caching - wfSuppressWarnings(); + MediaWiki\suppressWarnings(); $_apcEnabled = ini_set( 'apc.cache_by_default', '0' ); - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); include $_fileName; - wfSuppressWarnings(); + MediaWiki\suppressWarnings(); ini_set( 'apc.cache_by_default', $_apcEnabled ); - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); if ( $_fileType == 'core' || $_fileType == 'extension' ) { $data = compact( self::$allKeys ); @@ -536,13 +539,11 @@ class LocalisationCache { public function readJSONFile( $fileName ) { if ( !is_readable( $fileName ) ) { - return array(); } $json = file_get_contents( $fileName ); if ( $json === false ) { - return array(); } |