contains the number of revisions in the history
* $wgStylePath and $wgLogo are now set in the default LocalSettings.php file.
* (bug 20186) Allow filtering history for revision deletion.
-* New hook getOtherBlockLogLink, called in Special:IPBlockList to show links
- to block logs of other blocking extensions, i.e. GlobalBlocking
+* New hook getOtherBlockLogLink, called in Special:IPBlockList and Special:Block
+ to show links to block logs of other blocking extensions, i.e. GlobalBlocking
* Added search capabilities to SQLite backend
* rebuildtextindex.php maintenance script now supports databases other than
MySQL
$wgOut->setSubtitle( wfMsgHtml( 'formerror' ) );
$wgOut->addHTML( Xml::tags( 'p', array( 'class' => 'error' ), $msg ) );
} elseif( $this->BlockAddress ) {
+ # Get other blocks, i.e. from GlobalBlocking or TorBlock extension
+ wfRunHooks( 'getOtherBlockLogLink', array( &$otherBlockedMsgs, $this->BlockAddress ) );
+
$userId = is_object( $user ) ? $user->getId() : 0;
$currentBlock = Block::newFromDB( $this->BlockAddress, $userId );
if( !is_null( $currentBlock ) && !$currentBlock->mAuto && # The block exists and isn't an autoblock
# or if it is, the range is what we're about to block
( $currentBlock->mAddress == $this->BlockAddress ) )
) {
- $wgOut->addWikiMsg( 'ipb-needreblock', $this->BlockAddress );
$alreadyBlocked = true;
# Set the block form settings to the existing block
if( !$this->wasPosted ) {
}
}
+ # Show other blocks from extensions, i.e. GlockBlocking and TorBlock
+ if( count( $otherBlockedMsgs ) ) {
+ $wgOut->addHTML(
+ Html::rawElement( 'h2', array(), wfMsgExt( 'ipb-otherblocks-header', 'parseinline', count( $otherBlockedMsgs ) ) ) . "\n"
+ );
+ $list = '';
+ foreach( $otherBlockedMsgs as $link ) {
+ $list .= Html::rawElement( 'li', array(), $link ) . "\n";
+ }
+ $wgOut->addHTML( Html::rawElement( 'ul', array( 'class' => 'mw-blockip-alreadyblocked' ), $list ) . "\n" );
+ }
+
+ # Username/IP is blocked already locally
+ if( $alreadyBlocked ) {
+ $wgOut->addWikiMsg( 'ipb-needreblock', $this->BlockAddress );
+ }
+
$scBlockExpiryOptions = wfMsgForContent( 'ipboptions' );
$showblockoptions = $scBlockExpiryOptions != '-';
'ipb-needreblock' => '== Already blocked ==
$1 is already blocked.
Do you want to change the settings?',
+'ipb-otherblocks-header' => 'Other {{PLURAL:$1|block|blocks}}',
'ipb_cant_unblock' => 'Error: Block ID $1 not found.
It may have been unblocked already.',
'ipb_blocked_as_range' => 'Error: The IP $1 is not blocked directly and cannot be unblocked.