Merge "Type hint against LinkTarget in WatchedItemStore"
[lhc/web/wiklou.git] / includes / cache / localisation / LocalisationCache.php
index c4a7e89..ffc7cd0 100644 (file)
@@ -407,7 +407,7 @@ class LocalisationCache {
         */
        public function isExpired( $code ) {
                if ( $this->forceRecache && !isset( $this->recachedLangs[$code] ) ) {
-                       $this->logger->debug( __METHOD__ . "($code): forced reload\n" );
+                       $this->logger->debug( __METHOD__ . "($code): forced reload" );
 
                        return true;
                }
@@ -417,7 +417,7 @@ class LocalisationCache {
                $preload = $this->store->get( $code, 'preload' );
                // Different keys may expire separately for some stores
                if ( $deps === null || $keys === null || $preload === null ) {
-                       $this->logger->debug( __METHOD__ . "($code): cache missing, need to make one\n" );
+                       $this->logger->debug( __METHOD__ . "($code): cache missing, need to make one" );
 
                        return true;
                }
@@ -429,7 +429,7 @@ class LocalisationCache {
                        // When this happens, always expire the cache
                        if ( !$dep instanceof CacheDependency || $dep->isExpired() ) {
                                $this->logger->debug( __METHOD__ . "($code): cache for $code expired due to " .
-                                       get_class( $dep ) . "\n" );
+                                       get_class( $dep ) );
 
                                return true;
                        }
@@ -836,10 +836,10 @@ class LocalisationCache {
                # Load the primary localisation from the source file
                $data = $this->readSourceFilesAndRegisterDeps( $code, $deps );
                if ( $data === false ) {
-                       $this->logger->debug( __METHOD__ . ": no localisation file for $code, using fallback to en\n" );
+                       $this->logger->debug( __METHOD__ . ": no localisation file for $code, using fallback to en" );
                        $coreData['fallback'] = 'en';
                } else {
-                       $this->logger->debug( __METHOD__ . ": got localisation for $code from source\n" );
+                       $this->logger->debug( __METHOD__ . ": got localisation for $code from source" );
 
                        # Merge primary localisation
                        foreach ( $data as $key => $value ) {
@@ -1004,8 +1004,8 @@ class LocalisationCache {
                        $allData['list'][$key] = array_keys( $allData[$key] );
                }
                # Run hooks
-               $purgeBlobs = true;
-               Hooks::run( 'LocalisationCacheRecache', [ $this, $code, &$allData, &$purgeBlobs ] );
+               $unused = true; // Used to be $purgeBlobs, removed in 1.34
+               Hooks::run( 'LocalisationCacheRecache', [ $this, $code, &$allData, &$unused ] );
 
                if ( is_null( $allData['namespaceNames'] ) ) {
                        throw new MWException( __METHOD__ . ': Localisation data failed sanity check! ' .
@@ -1037,7 +1037,7 @@ class LocalisationCache {
                # Clear out the MessageBlobStore
                # HACK: If using a null (i.e. disabled) storage backend, we
                # can't write to the MessageBlobStore either
-               if ( $purgeBlobs && !$this->store instanceof LCStoreNull ) {
+               if ( !$this->store instanceof LCStoreNull ) {
                        $blobStore = MediaWikiServices::getInstance()->getResourceLoader()->getMessageBlobStore();
                        $blobStore->clear();
                }