BaseTemplate: Remove code for unused 'ispermalink' toolbox item
authorBartosz Dziewoński <matma.rex@gmail.com>
Tue, 27 Mar 2018 19:43:28 +0000 (21:43 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Tue, 27 Mar 2018 19:45:57 +0000 (21:45 +0200)
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
maintenance/dictionary/mediawiki.dic

index 08ab86a..e1f2969 100644 (file)
@@ -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'];
index e3c7e0f..ff06e49 100644 (file)
@@ -2027,7 +2027,6 @@ isminor
 ismodsince
 ismulti
 isnew
-ispermalink
 isroot
 isself
 isset