From 48e423cd142d3a98d491c65bb1447655e13e1ac2 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 30 May 2004 22:30:10 +0000 Subject: [PATCH] Don't show user contribs/email link on non-user pages (bug 963283) --- includes/SkinPHPTal.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/includes/SkinPHPTal.php b/includes/SkinPHPTal.php index 77f5558cf2..7daf0eb170 100644 --- a/includes/SkinPHPTal.php +++ b/includes/SkinPHPTal.php @@ -490,9 +490,13 @@ $nav_urls['upload'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Upload'))); $nav_urls['specialpages'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Specialpages'))); - - $id=User::idFromName($wgTitle->getText()); - $ip=User::isIP($wgTitle->getText()); + if( $wgTitle->getNamespace() == NS_USER || $wgTitle->getNamespace() == NS_USER_TALK ) { + $id = User::idFromName($wgTitle->getText()); + $ip = User::isIP($wgTitle->getText()); + } else { + $id = 0; + $ip = false; + } if($id || $ip) { # both anons and non-anons have contri list $nav_urls['contributions'] = array( -- 2.20.1