- function blockedPage( $return = true ) {
- global $wgContLang;
-
- $this->setPageTitle( wfMsg( 'blockedtitle' ) );
- $this->setRobotPolicy( 'noindex,nofollow' );
- $this->setArticleRelated( false );
-
- $name = $this->getUser()->blockedBy();
- $reason = $this->getUser()->blockedFor();
- if( $reason == '' ) {
- $reason = wfMsg( 'blockednoreason' );
- }
- $blockTimestamp = $this->getContext()->getLang()->timeanddate(
- wfTimestamp( TS_MW, $this->getUser()->mBlock->mTimestamp ), true
- );
- $ip = wfGetIP();
-
- $link = '[[' . $wgContLang->getNsText( NS_USER ) . ":{$name}|{$name}]]";
-
- $blockid = $this->getUser()->mBlock->getId();
-
- $blockExpiry = $this->getContext()->getLang()->formatExpiry( $this->getUser()->mBlock->mExpiry );
-
- if ( $this->getUser()->mBlock->mAuto ) {
- $msg = 'autoblockedtext';
- } else {
- $msg = 'blockedtext';
- }
-
- /* $ip returns who *is* being blocked, $intended contains who was meant to be blocked.
- * This could be a username, an IP range, or a single IP. */
- $intended = $this->getUser()->mBlock->getTarget();
-
- $this->addWikiMsg(
- $msg, $link, $reason, $ip, $name, $blockid, $blockExpiry,
- $intended, $blockTimestamp
- );
-
- # Don't auto-return to special pages
- if( $return ) {
- $return = $this->getTitle()->getNamespace() > -1 ? $this->getTitle() : null;
- $this->returnToMain( null, $return );
- }