New hook getOtherBlockLogLink, called in Special:IPBlockList to show links to block...
authorRaimond Spekking <raymond@users.mediawiki.org>
Tue, 27 Oct 2009 14:08:02 +0000 (14:08 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Tue, 27 Oct 2009 14:08:02 +0000 (14:08 +0000)
RELEASE-NOTES
docs/hooks.txt
includes/specials/SpecialIpblocklist.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index e9dcc56..aac8533 100644 (file)
@@ -263,6 +263,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   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
 
 === Bug fixes in 1.16 ===
 
index ca3cda4..238a35b 100644 (file)
@@ -782,6 +782,11 @@ $title: Title object of page
 $url: string value as output (out parameter, can modify)
 $query: query options passed to Title::getLocalURL()
 
+'getOtherBlockLogLink': Get links to the block log from extensions which blocks
+       users and/or IP addresses too
+$otherBlockLink: An array with links to other block logs
+$$this->ip: The requested IP address or username
+
 'GetPreferences': modify user preferences
 $user: User whose preferences are being modified.
 &$preferences: Preferences description array, to be fed to an HTMLForm object
index c81ae49..010375a 100644 (file)
@@ -311,6 +311,20 @@ class IPUnblockForm {
                        $wgOut->addHTML( $this->searchForm() );
                        $wgOut->addWikiMsg( 'ipblocklist-empty' );
                }
+
+               $otherBlockLink = array();
+               wfRunHooks( 'getOtherBlockLogLink', array( &$otherBlockLink, $this->ip ) );
+               if( count( $otherBlockLink ) ) {
+                       $wgOut->addHTML(
+                               Html::rawElement( 'h2', array(), wfMsg( 'ipblocklist-otherblocks' ) ) . "\n"
+                       );
+                       $list = '';
+                       foreach( $otherBlockLink as $link ) {
+                               $list .= Html::rawElement( 'li', array(), $link ) . "\n";
+                       }
+                       $wgOut->addHTML( Html::rawElement( 'ul', array( 'class' => 'mw-ipblocklist-otherblocks' ), $list ) . "\n" );
+               }
+
        }
 
        function searchForm() {
index 2b1933c..b3eaebb 100644 (file)
@@ -2953,6 +2953,7 @@ See [[Special:IPBlockList|IP block list]] to review blocks.',
 'ipblocklist-sh-addressblocks'    => '$1 single IP blocks',
 'ipblocklist-summary'             => '', # do not translate or duplicate this message to other languages
 'ipblocklist-submit'              => 'Search',
+'ipblocklist-otherblocks'         => 'Other blocks',
 'blocklistline'                   => '$1, $2 blocked $3 ($4)',
 'infiniteblock'                   => 'infinite',
 'expiringblock'                   => 'expires on $1 at $2',
index f6d7536..9dbaefd 100644 (file)
@@ -1988,6 +1988,7 @@ $wgMessageStructure = array(
                'ipblocklist-sh-addressblocks',
                'ipblocklist-summary',
                'ipblocklist-submit',
+               'ipblocklist-otherblocks',
                'blocklistline',
                'infiniteblock',
                'expiringblock',