Hide last modified bar on old revisions

Bug: T153125
Change-Id: I43f6f1993ebeacead12d7ec6da584c6d1e14da12
This commit is contained in:
jdlrobson 2017-09-06 11:26:39 -04:00 committed by Jdlrobson
parent 0f0214241d
commit 69cb08262a
1 changed files with 6 additions and 1 deletions

View File

@ -855,12 +855,17 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
$tpl->set( 'postheadinghtml', $postHeadingHtml );
if ( $this->canUseWikiPage() ) {
$isLatestRevision = $this->getRevisionId() === $title->getLatestRevID();
// If it's a page that exists, add last edited timestamp
if ( $this->getWikiPage()->exists() ) {
// The last modified bar is only rendered on the latest revision.
// For older revisions the last modified
// information appears at the top of the page.
if ( $this->getWikiPage()->exists() && $isLatestRevision ) {
$tpl->set( 'historyLink', $this->getHistoryLink( $title ) );
}
}
$tpl->set( 'headinghtml', $this->getHeadingHtml() );
$tpl->set( 'footer-site-heading-html', $this->getSitename() );
// set defaults
if ( !isset( $tpl->data['postbodytext'] ) ) {