$this->BlockExpiry = $wgRequest->getVal( 'wpBlockExpiry', wfMsg('ipbotheroption') );
$this->BlockOther = $wgRequest->getVal( 'wpBlockOther', '' );
- # Unchecked checkboxes are not included in the form data at all, so having one
+ # Unchecked checkboxes are not included in the form data at all, so having one
# that is true by default is a bit tricky
$byDefault = !$wgRequest->wasPosted();
$this->BlockAnonOnly = $wgRequest->getBool( 'wpAnonOnly', $byDefault );
} elseif( preg_match( '/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/', $this->BlockAddress ) ) {
$this->showLogFragment( $wgOut, Title::makeTitle( NS_USER, $this->BlockAddress ) );
}
-
}
function doSubmit() {
# Note: for a user block, ipb_address is only for display purposes
$block = new Block( $this->BlockAddress, $userId, $wgUser->getID(),
- $this->BlockReason, wfTimestampNow(), 0, $expiry, $this->BlockAnonOnly,
+ $this->BlockReason, wfTimestampNow(), 0, $expiry, $this->BlockAnonOnly,
$this->BlockCreateAccount, $this->BlockEnableAutoblock );
if (wfRunHooks('BlockIp', array(&$block, &$wgUser))) {
if ( !$block->insert() ) {
- $this->showForm( wfMsg( 'ipb_already_blocked',
+ $this->showForm( wfMsg( 'ipb_already_blocked',
htmlspecialchars( $this->BlockAddress ) ) );
return;
}
$text = wfMsg( 'blockipsuccesstext', $this->BlockAddress );
$wgOut->addWikiText( $text );
}
-
+
function showLogFragment( $out, $title ) {
$out->addHtml( wfElement( 'h2', NULL, LogPage::logName( 'block' ) ) );
$request = new FauxRequest( array( 'page' => $title->getPrefixedText(), 'type' => 'block' ) );
$flags[] = 'autoblock';
return implode( ',', $flags );
}
-
+
/**
* Builds unblock and block list links
*
$links[] = $this->getBlockListLink( $skin );
return '<p class="mw-ipb-conveniencelinks">' . implode( ' | ', $links ) . '</p>';
}
-
+
/**
* Build a convenient link to unblock the given username or IP
* address, if available; otherwise link to a blank unblock
return $skin->makeKnownLinkObj( $list, wfMsgHtml( 'ipb-unblock' ), 'action=unblock' );
}
}
-
+
/**
* Build a convenience link to the block list
*
return $skin->makeKnownLinkObj( $list, wfMsgHtml( 'ipb-blocklist' ) );
}
}
-
}
-
?>