X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Factions%2FHistoryAction.php;h=1e1bb39aec1a36568f7a7a4056791178a5632e7e;hp=0df372efa3a19c3d4e2b28c704302fd99ff25b1c;hb=f43fa6f4f0e2cb60b8543daad661b48a3e0653a9;hpb=41269d28db317de86e4fafe35f781432bd2d4dc0 diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index 0df372efa3..1e1bb39aec 100644 --- a/includes/actions/HistoryAction.php +++ b/includes/actions/HistoryAction.php @@ -105,8 +105,7 @@ class HistoryAction extends FormlessAction { $config = $this->context->getConfig(); # Fill in the file cache if not set already - $useFileCache = $config->get( 'UseFileCache' ); - if ( $useFileCache && HTMLFileCache::useFileCache( $this->getContext() ) ) { + if ( HTMLFileCache::useFileCache( $this->getContext() ) ) { $cache = new HTMLFileCache( $this->getTitle(), 'history' ); if ( !$cache->isCacheGood( /* Assume up to date */ ) ) { ob_start( [ &$cache, 'saveToFileCache' ] ); @@ -140,6 +139,10 @@ class HistoryAction extends FormlessAction { // Fail nicely if article doesn't exist. if ( !$this->page->exists() ) { + global $wgSend404Code; + if ( $wgSend404Code ) { + $out->setStatusCode( 404 ); + } $out->addWikiMsg( 'nohistory' ); # show deletion/move log if there is an entry LogEventsList::showLogExtract( @@ -234,7 +237,7 @@ class HistoryAction extends FormlessAction { return new FakeResultWrapper( [] ); } - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); if ( $direction === self::DIR_PREV ) { list( $dirs, $oper ) = [ "ASC", ">=" ];