From bdf40d7cca65a5cc6d74c8885a31e76b1cc2aee6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Tue, 27 Mar 2018 21:43:28 +0200 Subject: [PATCH] BaseTemplate: Remove code for unused 'ispermalink' toolbox item This code path is never used. When introduced in 2005 (bf0d92d5 / rSVN10709), the "Permanent link" item in the MonoBook sidebar was a link to an oldid only when viewing the latest version of an article (using the ID 't-permalink'), and otherwise it was a greyed out link to nowhere to indicate you're already viewing a permanent link (using the ID 't-ispermalink'). Later, in 2007, when the behavior of "Cite this page" item (now part of the CiteThisPage extension) was corrected for old revisions (1a60bd4c / rSVN21819), the "greying out" of the permalink was removed to be consistent with the new item. Only half of the feature was removed though: permalink was no longer a link to nowhere, but the code in MonoBook to make permalinks that are links to nowhere greyed out (by using different ID) stayed. This code was then dutifully preserved when BaseTemplate, MonoBook was rewritten, and then through several refactorings. I think we can safely remove it. Leftover styles in MonoBook are being removed in I58aca1f4255df14d6289e167e180dad31b546a8c. Change-Id: I2fb3d7e0ecb3bbbd0c09774e2d86f86502a48bf1 --- includes/skins/BaseTemplate.php | 9 +-------- maintenance/dictionary/mediawiki.dic | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/includes/skins/BaseTemplate.php b/includes/skins/BaseTemplate.php index 08ab86af79..e1f2969a77 100644 --- a/includes/skins/BaseTemplate.php +++ b/includes/skins/BaseTemplate.php @@ -98,14 +98,7 @@ abstract class BaseTemplate extends QuickTemplate { } if ( isset( $this->data['nav_urls']['permalink'] ) && $this->data['nav_urls']['permalink'] ) { $toolbox['permalink'] = $this->data['nav_urls']['permalink']; - if ( $toolbox['permalink']['href'] === '' ) { - unset( $toolbox['permalink']['href'] ); - $toolbox['ispermalink']['tooltiponly'] = true; - $toolbox['ispermalink']['id'] = 't-ispermalink'; - $toolbox['ispermalink']['msg'] = 'permalink'; - } else { - $toolbox['permalink']['id'] = 't-permalink'; - } + $toolbox['permalink']['id'] = 't-permalink'; } if ( isset( $this->data['nav_urls']['info'] ) && $this->data['nav_urls']['info'] ) { $toolbox['info'] = $this->data['nav_urls']['info']; diff --git a/maintenance/dictionary/mediawiki.dic b/maintenance/dictionary/mediawiki.dic index e3c7e0ffdd..ff06e49d4d 100644 --- a/maintenance/dictionary/mediawiki.dic +++ b/maintenance/dictionary/mediawiki.dic @@ -2027,7 +2027,6 @@ isminor ismodsince ismulti isnew -ispermalink isroot isself isset -- 2.20.1