mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-01 01:06:31 +00:00
Merge "Fix history link"
This commit is contained in:
commit
f4b3b11053
|
@ -439,6 +439,10 @@ class SkinMinerva extends SkinMustache {
|
|||
->getRevisionLookup()
|
||||
->getTimestampFromId( $out->getRevisionId() );
|
||||
}
|
||||
|
||||
// Create history link and corresponding icons.
|
||||
$historyLinkAndIcons = [];
|
||||
if ( Action::getActionName( RequestContext::getMain() ) === 'view' ) {
|
||||
$historyIconClasses = [
|
||||
'historyIconClass' => MinervaUI::iconClass(
|
||||
'history-base20', 'mw-ui-icon-small', '', 'wikimedia'
|
||||
|
@ -459,9 +463,12 @@ class SkinMinerva extends SkinMustache {
|
|||
$this->getGenericHistoryLink( $title ) :
|
||||
$this->getRelativeHistoryLink( $title, $timestamp );
|
||||
|
||||
$historyLinkAndIcons = $historyLink + $historyIconClasses;
|
||||
}
|
||||
|
||||
$title = $this->getTitle();
|
||||
return $title->canExist() && $title->exists()
|
||||
? $historyLink + $historyIconClasses
|
||||
return $title->canExist() && $title->exists() && !empty( $historyLinkAndIcons )
|
||||
? $historyLinkAndIcons
|
||||
: null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue