From a1789ddde42033f1b05cc4929491214ee6e79383 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 17 Dec 2015 09:15:42 +0100 Subject: Update to MediaWiki 1.26.0 --- includes/cache/LocalisationCache.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'includes/cache/LocalisationCache.php') 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(); } -- cgit v1.2.3-54-g00ecf