* Print the history page for an article.
*/
function onView() {
- global $wgScript, $wgUseFileCache, $wgSquidMaxage;
+ global $wgScript, $wgUseFileCache;
$out = $this->getOutput();
$request = $this->getRequest();
wfProfileIn( __METHOD__ );
- if ( $request->getFullRequestURL() == $this->getTitle()->getInternalURL( 'action=history' ) ) {
- $out->setSquidMaxage( $wgSquidMaxage );
- }
-
$this->preCacheMessages();
# Fill in the file cache if not set already
* @return ResultWrapper
*/
function fetchRevisions( $limit, $offset, $direction ) {
+ // Fail if article doesn't exist.
+ if( !$this->getTitle()->exists() ) {
+ return new FakeResultWrapper( array() );
+ }
+
$dbr = wfGetDB( DB_SLAVE );
if ( $direction == HistoryPage::DIR_PREV ) {
if ( $notificationtimestamp && ( $row->rev_timestamp >= $notificationtimestamp ) ) {
$s2 .= ' <span class="updatedmarker">' . $this->msg( 'updatedmarker' )->escaped() . '</span>';
+ $classes[] = 'mw-history-line-updated';
}
$tools = array();
if ( $latest && !count( $this->getTitle()->getUserPermissionsErrors( 'rollback', $this->getUser() ) ) ) {
$this->preventClickjacking();
$tools[] = '<span class="mw-rollback-link">' .
- Linker::buildRollbackLink( $rev ) . '</span>';
+ Linker::buildRollbackLink( $rev, $this->getContext() ) . '</span>';
}
if ( !$rev->isDeleted( Revision::DELETED_TEXT )