Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -111,8 +111,16 @@ |
112 | 112 | |
113 | 113 | # Show the appropriate "footer" message - WHOIS tools, etc. |
114 | 114 | if( $target != 'newbies' ) { |
115 | | - $message = IP::isIPAddress( $target ) ? |
116 | | - 'sp-contributions-footer-anon' : 'sp-contributions-footer'; |
| 115 | + $message = 'sp-contributions-footer'; |
| 116 | + if ( IP::isIPAddress( $target ) ) { |
| 117 | + $message = 'sp-contributions-footer-anon'; |
| 118 | + } else { |
| 119 | + $user = User::newFromName( $target ); |
| 120 | + if ( !$user || $user->isAnon() ) { |
| 121 | + // No message for non-existing users |
| 122 | + return; |
| 123 | + } |
| 124 | + } |
117 | 125 | |
118 | 126 | $text = wfMsgNoTrans( $message, $target ); |
119 | 127 | if( !wfEmptyMsg( $message, $text ) && $text != '-' ) { |