- global $wgOut, $wgUser, $wgContLang;
-
- $wgOut->setPageTitle( wfMsg( 'blockedtitle' ) );
- $wgOut->setRobotpolicy( 'noindex,nofollow' );
- $wgOut->setArticleRelated( false );
-
- $id = $wgUser->blockedBy();
- $reason = $wgUser->blockedFor();
- $ip = wfGetIP();
-
- if ( is_numeric( $id ) ) {
- $name = User::whoIs( $id );
- } else {
- $name = $id;
- }
- $link = '[[' . $wgContLang->getNsText( NS_USER ) .
- ":{$name}|{$name}]]";
-
- $wgOut->addWikiText( wfMsg( 'blockedtext', $link, $reason, $ip, $name ) );
- $wgOut->returnToMain( false );