X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FHistoryAction.php;h=c1763fa1be33d38cda7643bd57c05510f7b0ceb4;hb=69ae945e8d39972a07bea89ddb64bc0189b43ac2;hp=0df372efa3a19c3d4e2b28c704302fd99ff25b1c;hpb=a303296f2730d6279a249bde77f3e0b9b42e494f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index 0df372efa3..c1763fa1be 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( @@ -215,7 +218,6 @@ class HistoryAction extends FormlessAction { $pager->getNavigationBar() ); $out->preventClickjacking( $pager->getPreventClickjacking() ); - } /** @@ -234,7 +236,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", ">=" ];