$this->reason = $reason;
}
+ /**
+ * Generates the unblock form
+ * @param $err string: error message
+ * @return $out string: HTML form
+ */
function showForm( $err ) {
global $wgOut, $wgUser, $wgSysopUserBans, $wgContLang;
$wgOut->addWikiMsg( 'unblockiptext' );
$ipa = wfMsgHtml( $wgSysopUserBans ? 'ipadressorusername' : 'ipaddress' );
- $ipr = wfMsgHtml( 'ipbreason' );
- $ipus = wfMsgHtml( 'ipusubmit' );
$titleObj = SpecialPage::getTitleFor( "Ipblocklist" );
$action = $titleObj->getLocalURL( "action=submit" );
$alignRight = $wgContLang->isRtl() ? 'left' : 'right';
$wgOut->addHTML(
Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action, 'id' => 'unblockip' ) ) .
- Xml::openElement( 'table', array( 'border' => '0' ) ).
+ Xml::openElement( 'fieldset' ) .
+ Xml::element( 'legend', null, wfMsg( 'ipb-unblock' ) ) .
+ Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-unblock-table' ) ).
"<tr>
<td align='$alignRight'>
{$ipa}
</td>
</tr>
<tr>
- <td align='$alignRight'>
- {$ipr}
- </td>
+ <td align='$alignRight'>" .
+ Xml::label( wfMsg( 'ipbreason' ), 'wpUnblockReason' ) .
+ "</td>
<td>" .
Xml::input( 'wpUnblockReason', 40, $this->reason, array( 'type' => 'text', 'tabindex' => '2' ) ) .
"</td>
<tr>
<td> </td>
<td>" .
- Xml::submitButton( $ipus, array( 'name' => 'wpBlock', 'tabindex' => '3' ) ) .
+ Xml::submitButton( wfMsg( 'ipusubmit' ), array( 'name' => 'wpBlock', 'tabindex' => '3' ) ) .
"</td>
</tr>" .
Xml::closeElement( 'table' ) .
+ Xml::closeElement( 'fieldset' ) .
Xml::hidden( 'wpEditToken', $token ) .
Xml::closeElement( 'form' ) . "\n"
);
$conds = array();
$matches = array();
// Is user allowed to see all the blocks?
- if ( !$wgUser->isAllowed( 'oversight' ) )
+ if ( !$wgUser->isAllowed( 'suppress' ) )
$conds['ipb_deleted'] = 0;
if ( $this->ip == '' ) {
// No extra conditions
# Usernames and titles are in fact related by a simple substitution of space -> underscore
# The last few lines of Title::secureAndSplit() tell the story.
while ( $row = $this->mResult->fetchObject() ) {
- $name = str_replace( ' ', '_', $row->user_name );
+ $name = str_replace( ' ', '_', $row->ipb_by_text );
$lb->add( NS_USER, $name );
$lb->add( NS_USER_TALK, $name );
$name = str_replace( ' ', '_', $row->ipb_address );
function getQueryInfo() {
$conds = $this->mConds;
$conds[] = 'ipb_expiry>' . $this->mDb->addQuotes( $this->mDb->timestamp() );
- $conds[] = 'ipb_by=user_id';
return array(
- 'tables' => array( 'ipblocks', 'user' ),
- 'fields' => $this->mDb->tableName( 'ipblocks' ) . '.*,user_name',
+ 'tables' => 'ipblocks',
+ 'fields' => '*',
'conds' => $conds,
);
}