From: Brion Vibber Date: Sun, 30 May 2004 22:30:10 +0000 (+0000) Subject: Don't show user contribs/email link on non-user pages (bug 963283) X-Git-Tag: 1.5.0alpha1~3128 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=48e423cd142d3a98d491c65bb1447655e13e1ac2;p=lhc%2Fweb%2Fwiklou.git Don't show user contribs/email link on non-user pages (bug 963283) --- 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(