summaryrefslogtreecommitdiff
path: root/includes/cache/LocalisationCache.php
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:32:59 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:32:59 -0400
commit6dc1997577fab2c366781fd7048144935afa0012 (patch)
tree8918d28c7ab4342f0738985e37af1dfc42d0e93a /includes/cache/LocalisationCache.php
parent150f94f051128f367bc89f6b7e5f57eb2a69fc62 (diff)
parentfa89acd685cb09cdbe1c64cbb721ec64975bbbc1 (diff)
Merge commit 'fa89acd'
# Conflicts: # .gitignore # extensions/ArchInterWiki.sql
Diffstat (limited to 'includes/cache/LocalisationCache.php')
-rw-r--r--includes/cache/LocalisationCache.php13
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();
}