Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1967,6 +1967,7 @@ |
1968 | 1968 | 'ipb_hide_invalid', |
1969 | 1969 | 'ipb_already_blocked', |
1970 | 1970 | 'ipb-needreblock', |
| 1971 | + 'ipb-otherblocks-header', |
1971 | 1972 | 'ipb_cant_unblock', |
1972 | 1973 | 'ipb_blocked_as_range', |
1973 | 1974 | 'ip_range_invalid', |
Index: trunk/phase3/includes/specials/SpecialBlockip.php |
— | — | @@ -105,6 +105,9 @@ |
106 | 106 | $wgOut->setSubtitle( wfMsgHtml( 'formerror' ) ); |
107 | 107 | $wgOut->addHTML( Xml::tags( 'p', array( 'class' => 'error' ), $msg ) ); |
108 | 108 | } elseif( $this->BlockAddress ) { |
| 109 | + # Get other blocks, i.e. from GlobalBlocking or TorBlock extension |
| 110 | + wfRunHooks( 'getOtherBlockLogLink', array( &$otherBlockedMsgs, $this->BlockAddress ) ); |
| 111 | + |
109 | 112 | $userId = is_object( $user ) ? $user->getId() : 0; |
110 | 113 | $currentBlock = Block::newFromDB( $this->BlockAddress, $userId ); |
111 | 114 | if( !is_null( $currentBlock ) && !$currentBlock->mAuto && # The block exists and isn't an autoblock |
— | — | @@ -112,7 +115,6 @@ |
113 | 116 | # or if it is, the range is what we're about to block |
114 | 117 | ( $currentBlock->mAddress == $this->BlockAddress ) ) |
115 | 118 | ) { |
116 | | - $wgOut->addWikiMsg( 'ipb-needreblock', $this->BlockAddress ); |
117 | 119 | $alreadyBlocked = true; |
118 | 120 | # Set the block form settings to the existing block |
119 | 121 | if( !$this->wasPosted ) { |
— | — | @@ -132,6 +134,23 @@ |
133 | 135 | } |
134 | 136 | } |
135 | 137 | |
| 138 | + # Show other blocks from extensions, i.e. GlockBlocking and TorBlock |
| 139 | + if( count( $otherBlockedMsgs ) ) { |
| 140 | + $wgOut->addHTML( |
| 141 | + Html::rawElement( 'h2', array(), wfMsgExt( 'ipb-otherblocks-header', 'parseinline', count( $otherBlockedMsgs ) ) ) . "\n" |
| 142 | + ); |
| 143 | + $list = ''; |
| 144 | + foreach( $otherBlockedMsgs as $link ) { |
| 145 | + $list .= Html::rawElement( 'li', array(), $link ) . "\n"; |
| 146 | + } |
| 147 | + $wgOut->addHTML( Html::rawElement( 'ul', array( 'class' => 'mw-blockip-alreadyblocked' ), $list ) . "\n" ); |
| 148 | + } |
| 149 | + |
| 150 | + # Username/IP is blocked already locally |
| 151 | + if( $alreadyBlocked ) { |
| 152 | + $wgOut->addWikiMsg( 'ipb-needreblock', $this->BlockAddress ); |
| 153 | + } |
| 154 | + |
136 | 155 | $scBlockExpiryOptions = wfMsgForContent( 'ipboptions' ); |
137 | 156 | |
138 | 157 | $showblockoptions = $scBlockExpiryOptions != '-'; |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2938,6 +2938,7 @@ |
2939 | 2939 | 'ipb-needreblock' => '== Already blocked == |
2940 | 2940 | $1 is already blocked. |
2941 | 2941 | Do you want to change the settings?', |
| 2942 | +'ipb-otherblocks-header' => 'Other {{PLURAL:$1|block|blocks}}', |
2942 | 2943 | 'ipb_cant_unblock' => 'Error: Block ID $1 not found. |
2943 | 2944 | It may have been unblocked already.', |
2944 | 2945 | 'ipb_blocked_as_range' => 'Error: The IP $1 is not blocked directly and cannot be unblocked. |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -266,8 +266,8 @@ |
267 | 267 | contains the number of revisions in the history |
268 | 268 | * $wgStylePath and $wgLogo are now set in the default LocalSettings.php file. |
269 | 269 | * (bug 20186) Allow filtering history for revision deletion. |
270 | | -* New hook getOtherBlockLogLink, called in Special:IPBlockList to show links |
271 | | - to block logs of other blocking extensions, i.e. GlobalBlocking |
| 270 | +* New hook getOtherBlockLogLink, called in Special:IPBlockList and Special:Block |
| 271 | + to show links to block logs of other blocking extensions, i.e. GlobalBlocking |
272 | 272 | * Added search capabilities to SQLite backend |
273 | 273 | * rebuildtextindex.php maintenance script now supports databases other than |
274 | 274 | MySQL |