$mIpbothertime = wfMsgHtml( 'ipbotheroption' );
$mIpbreason = wfMsgHtml( 'ipbreason' );
$mIpbsubmit = wfMsgHtml( 'ipbsubmit' );
- $mIpbanononly = wfMsgHtml( 'ipbanononly' );
- $mIpbcreateaccount = wfMsgHtml( 'ipbcreateaccount' );
$titleObj = Title::makeTitle( NS_SPECIAL, 'Blockip' );
$action = $titleObj->escapeLocalURL( "action=submit" );
$scBlockReason = htmlspecialchars( $this->BlockReason );
$scBlockOtherTime = htmlspecialchars( $this->BlockOther );
$scBlockExpiryOptions = htmlspecialchars( wfMsgForContent( 'ipboptions' ) );
- $anonOnlyChecked = $this->BlockAnonOnly ? 'checked' : '';
- $createAccountChecked = $this->BlockCreateAccount ? 'checked' : '';
$showblockoptions = $scBlockExpiryOptions != '-';
if (!$showblockoptions)
<tr>
<td> </td>
<td align=\"left\">
- <label>
- <input type='checkbox' name='wpAnonOnly' value='1' $anonOnlyChecked />
- {$mIpbanononly}
- </label>
+ " . wfCheckLabel( wfMsg( 'ipbanononly' ),
+ 'wpAnonOnly', 'wpAnonOnly', $this->BlockAnonOnly ) . "
</td>
</tr>
<tr>
<td> </td>
<td align=\"left\">
- <label>
- <input type='checkbox' name='wpCreateAccount' value='1' $createAccountChecked />
- {$mIpbcreateaccount}
- </label>
+ " . wfCheckLabel( wfMsg( 'ipbcreateaccount' ),
+ 'wpCreateAccount', 'wpCreateAccount', $this->BlockCreateAccount ) . "
</td>
</tr>
<tr>
# Username block
if ( $wgSysopUserBans ) {
$user = User::newFromName( $this->BlockAddress );
- if ( $user->getID() ) {
+ if( !is_null( $user ) && $user->getID() ) {
# Use canonical name
$this->BlockAddress = $user->getName();
} else {