$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' ] );
// Setup page variables.
$out->setFeedAppendQuery( 'action=history' );
$out->addModules( 'mediawiki.action.history' );
+ $out->addModuleStyles( [
+ 'mediawiki.action.history.styles',
+ 'mediawiki.special.changeslist',
+ ] );
if ( $config->get( 'UseMediaWikiUIEverywhere' ) ) {
$out = $this->getOutput();
$out->addModuleStyles( [
// 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(
$pager->getNavigationBar()
);
$out->preventClickjacking( $pager->getPreventClickjacking() );
-
}
/**
return new FakeResultWrapper( [] );
}
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
if ( $direction === self::DIR_PREV ) {
list( $dirs, $oper ) = [ "ASC", ">=" ];
$s .= $dirmark;
if ( $rev->isMinor() ) {
- $s .= ' ' . ChangesList::flag( 'minor' );
+ $s .= ' ' . ChangesList::flag( 'minor', $this->getContext() );
}
# Sometimes rev_len isn't populated