Don't show user contribs/email link on non-user pages (bug 963283)
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 30 May 2004 22:30:10 +0000 (22:30 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 30 May 2004 22:30:10 +0000 (22:30 +0000)
includes/SkinPHPTal.php

index 77f5558..7daf0eb 100644 (file)
                        $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(