filecache: Use current action instead of "view" only in outage mode
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 28 Jun 2017 03:52:23 +0000 (20:52 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Wed, 28 Jun 2017 03:56:59 +0000 (20:56 -0700)
Regression from 3ad9e41be9. Prior, $action was also passed to HTMLFileCache.

Change-Id: Ie0f1c8b73d306bc710c346ad97868c53fb59809d

includes/MediaWiki.php

index 364ed86..19e827d 100644 (file)
@@ -539,7 +539,7 @@ class MediaWiki {
                                HTMLFileCache::useFileCache( $this->context, HTMLFileCache::MODE_OUTAGE )
                        ) {
                                // Try to use any (even stale) file during outages...
-                               $cache = new HTMLFileCache( $context->getTitle(), 'view' );
+                               $cache = new HTMLFileCache( $context->getTitle(), $action );
                                if ( $cache->isCached() ) {
                                        $cache->loadFromFileCache( $context, HTMLFileCache::MODE_OUTAGE );
                                        print MWExceptionRenderer::getHTML( $e );