From b2607d3a1a8922545fc8ce361ab580692010dd81 Mon Sep 17 00:00:00 2001 From: Jan Drewniak Date: Thu, 21 Mar 2019 12:22:35 +0100 Subject: [PATCH] Only show history link in page-actions menu if page exists Bug: T213352 Change-Id: Ib51c68679426fdf0bd4cc33aeda37decebfd4ace --- includes/skins/SkinMinerva.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index d441fe2..d7f0883 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -261,6 +261,10 @@ class SkinMinerva extends SkinTemplate { && ( $action === 'talk' || $action === 'switch-language' ) ); } + if ( $action === 'history' && $title->exists() ) { + return $this->getSkinOption( self::OPTIONS_HISTORY_PAGE_ACTIONS ); + } + if ( !in_array( $action, $config->get( 'MinervaPageActions' ) ) || ( $this->getUserPageHelper()->isUserPage() && !$title->exists() ) @@ -1160,7 +1164,7 @@ class SkinMinerva extends SkinTemplate { $menu[] = $this->createWatchPageAction( $actions ); } - if ( $this->getSkinOption( self::OPTIONS_HISTORY_PAGE_ACTIONS ) ) { + if ( $this->isAllowedPageAction( 'history' ) ) { $menu[] = $this->getHistoryPageAction(); }