From 69cb08262a1353d321e9b2aaadecbc46ef2ee847 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Wed, 6 Sep 2017 11:26:39 -0400 Subject: [PATCH] Hide last modified bar on old revisions Bug: T153125 Change-Id: I43f6f1993ebeacead12d7ec6da584c6d1e14da12 --- includes/skins/SkinMinerva.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index ee57b5b..4bf7384 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -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'] ) ) {