From 49b2be3b9f2c2ca27d0f7c59a992d0c79bc0024c Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 20 Sep 2004 17:42:12 +0000 Subject: [PATCH] Fix http://bugzilla.wikipedia.org/show_bug.cgi?id=511 . Stop showing whatlinkshere and relatedchanges links for special pages. --- includes/SkinPHPTal.php | 9 ++++++--- skins/Amethyst.pt | 4 ++-- skins/MonoBook.pt | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/includes/SkinPHPTal.php b/includes/SkinPHPTal.php index 0a5fe479d0..cc8e451bb2 100644 --- a/includes/SkinPHPTal.php +++ b/includes/SkinPHPTal.php @@ -172,6 +172,7 @@ class SkinPHPTal extends Skin { $tpl->setRef( 'stylename', $this->stylename ); $tpl->setRef( 'loggedin', $this->loggedin ); $tpl->set('nsclass', 'ns-'.$wgTitle->getNamespace()); + $tpl->set('notspecialpage', $wgTitle->getNamespace() != NS_SPECIAL); /* XXX currently unused, might get useful later $tpl->set( "editable", ($wgTitle->getNamespace() != NS_SPECIAL ) ); $tpl->set( "exists", $wgTitle->getArticleID() != 0 ); @@ -526,10 +527,8 @@ class SkinPHPTal extends Skin { $nav_urls['mainpage'] = array('href' => htmlspecialchars( $this->makeI18nUrl('mainpage'))); $nav_urls['randompage'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Randompage'))); $nav_urls['recentchanges'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchanges'))); - $nav_urls['whatlinkshere'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Whatlinkshere', 'target='.urlencode( $this->thispage )))); $nav_urls['currentevents'] = (wfMsg('currentevents') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('currentevents'))) : false; $nav_urls['portal'] = (wfMsg('portal') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('portal-url'))) : false; - $nav_urls['recentchangeslinked'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchangeslinked', 'target='.urlencode( $this->thispage )))); $nav_urls['bugreports'] = array('href' => htmlspecialchars( $this->makeI18nUrl('bugreportspage'))); // $nav_urls['sitesupport'] = array('href' => htmlspecialchars( $this->makeI18nUrl('sitesupportpage'))); $nav_urls['sitesupport'] = array('href' => htmlspecialchars( $wgSiteSupportPage)); @@ -539,6 +538,11 @@ class SkinPHPTal extends Skin { } $nav_urls['specialpages'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Specialpages'))); + if( $wgTitle->getNamespace() != NS_SPECIAL) { + $nav_urls['whatlinkshere'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Whatlinkshere', 'target='.urlencode( $this->thispage )))); + $nav_urls['recentchangeslinked'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchangeslinked', 'target='.urlencode( $this->thispage )))); + } + if( $wgTitle->getNamespace() == NS_USER || $wgTitle->getNamespace() == NS_USER_TALK ) { $id = User::idFromName($wgTitle->getText()); $ip = User::isIP($wgTitle->getText()); @@ -560,7 +564,6 @@ class SkinPHPTal extends Skin { } } - return $nav_urls; } diff --git a/skins/Amethyst.pt b/skins/Amethyst.pt index edacf4c263..199ddf8042 100644 --- a/skins/Amethyst.pt +++ b/skins/Amethyst.pt @@ -97,9 +97,9 @@
Toolbox