+ # Watchlist their user page?
+ $wgOut->addHTML("
+ <tr id='wpEnableWatchUser'>
+ <td> </td>
+ <td class='mw-input'>" .
+ Xml::checkLabel( wfMsg( 'ipbwatchuser' ),
+ 'wpWatchUser', 'wpWatchUser', $this->BlockWatchUser,
+ array( 'tabindex' => '11' ) ) . "
+ </td>
+ </tr>"
+ );
+
+ $wgOut->addHTML("
+ <tr>
+ <td style='padding-top: 1em'> </td>
+ <td class='mw-submit' style='padding-top: 1em'>" .
+ Xml::submitButton( wfMsg( 'ipbsubmit' ),
+ array( 'name' => 'wpBlock', 'tabindex' => '12' ) ) . "
+ </td>
+ </tr>" .
+ Xml::closeElement( 'table' ) .
+ Xml::hidden( 'wpEditToken', $wgUser->editToken() ) .
+ Xml::closeElement( 'fieldset' ) .
+ Xml::closeElement( 'form' ) .
+ Xml::tags( 'script', array( 'type' => 'text/javascript' ), 'updateBlockOptions()' ) . "\n"
+ );
+
+ $wgOut->addHtml( $this->getConvenienceLinks() );
+
+ $user = User::newFromName( $this->BlockAddress );
+ if( is_object( $user ) ) {
+ $this->showLogFragment( $wgOut, $user->getUserPage() );
+ } 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 ) );
+ } elseif( preg_match( '/^\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}:\w{1,4}/', $this->BlockAddress ) ) {
+ $this->showLogFragment( $wgOut, Title::makeTitle( NS_USER, $this->BlockAddress ) );
+ }
+ }
+
+ /**
+ * Backend block code.
+ * $userID and $expiry will be filled accordingly
+ * @return array(message key, arguments) on failure, empty array on success
+ */
+ function doBlock(&$userId = null, &$expiry = null)
+ {
+ global $wgUser, $wgSysopUserBans, $wgSysopRangeBans;
+