r60494 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60493‎ | r60494 | r60495 >
Date:08:51, 30 December 2009
Author:raymond
Status:ok
Tags:
Comment:
Rename hook per Tim's CR on r58192
Modified paths:
  • /trunk/extensions/GlobalBlocking/GlobalBlocking.php (modified) (history)
  • /trunk/extensions/TorBlock/TorBlock.php (modified) (history)
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/specials/SpecialBlockip.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialIpblocklist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -787,11 +787,6 @@
788788 $url: string value as output (out parameter, can modify)
789789 $query: query options passed to Title::getLocalURL()
790790
791 -'getOtherBlockLogLink': Get links to the block log from extensions which blocks
792 - users and/or IP addresses too
793 -$otherBlockLink: An array with links to other block logs
794 -$ip: The requested IP address or username
795 -
796791 'GetPreferences': modify user preferences
797792 $user: User whose preferences are being modified.
798793 &$preferences: Preferences description array, to be fed to an HTMLForm object
@@ -1112,6 +1107,11 @@
11131108 Hooks can alter or append to the array of URLs for search & suggestion formats.
11141109 &$urls: array of associative arrays with Url element attributes
11151110
 1111+'OtherBlockLogLink': Get links to the block log from extensions which blocks
 1112+ users and/or IP addresses too
 1113+$otherBlockLink: An array with links to other block logs
 1114+$ip: The requested IP address or username
 1115+
11161116 'OutputPageBeforeHTML': a page has been processed by the parser and
11171117 the resulting HTML is about to be displayed.
11181118 $parserOutput: the parserOutput (object) that corresponds to the page
Index: trunk/phase3/includes/specials/SpecialIpblocklist.php
@@ -302,7 +302,7 @@
303303
304304 // Check for other blocks, i.e. global/tor blocks
305305 $otherBlockLink = array();
306 - wfRunHooks( 'getOtherBlockLogLink', array( &$otherBlockLink, $this->ip ) );
 306+ wfRunHooks( 'OtherBlockLogLink', array( &$otherBlockLink, $this->ip ) );
307307
308308 // Show additional header for the local block only when other blocks exists.
309309 // Not necessary in a standard installation without such extensions enabled
Index: trunk/phase3/includes/specials/SpecialBlockip.php
@@ -107,7 +107,7 @@
108108 $wgOut->addHTML( Xml::tags( 'p', array( 'class' => 'error' ), $msg ) );
109109 } elseif( $this->BlockAddress ) {
110110 # Get other blocks, i.e. from GlobalBlocking or TorBlock extension
111 - wfRunHooks( 'getOtherBlockLogLink', array( &$otherBlockedMsgs, $this->BlockAddress ) );
 111+ wfRunHooks( 'OtherBlockLogLink', array( &$otherBlockedMsgs, $this->BlockAddress ) );
112112
113113 $userId = is_object( $user ) ? $user->getId() : 0;
114114 $currentBlock = Block::newFromDB( $this->BlockAddress, $userId );
Index: trunk/extensions/TorBlock/TorBlock.php
@@ -37,7 +37,7 @@
3838 $wgHooks['AbuseFilter-filterAction'][] = 'TorBlock::onAbuseFilterFilterAction';
3939 $wgHooks['AbuseFilter-builder'][] = 'TorBlock::onAbuseFilterBuilder';
4040 $wgHooks['EmailUserPermissionsErrors'][] = 'TorBlock::onEmailUserPermissionsErrors';
41 -$wgHooks['getOtherBlockLogLink'][] = 'TorBlock::getTorBlockStatus';
 41+$wgHooks['OtherBlockLogLink'][] = 'TorBlock::getTorBlockStatus';
4242
4343 // Define new autopromote condition
4444 define('APCOND_TOR', 'tor'); // Numbers won't work, we'll get collisions
Index: trunk/extensions/GlobalBlocking/GlobalBlocking.php
@@ -29,7 +29,7 @@
3030 $wgHooks['getUserPermissionsErrorsExpensive'][] = 'GlobalBlocking::getUserPermissionsErrors';
3131 $wgHooks['UserIsBlockedGlobally'][] = 'GlobalBlocking::isBlockedGlobally';
3232 $wgHooks['UserLoginMailPassword'][] = 'GlobalBlocking::onMailPassword';
33 -$wgHooks['getOtherBlockLogLink'][] = 'GlobalBlocking::getBlockLogLink';
 33+$wgHooks['OtherBlockLogLink'][] = 'GlobalBlocking::getBlockLogLink';
3434
3535 $wgAutoloadClasses['SpecialGlobalBlock'] = "$dir/SpecialGlobalBlock.php";
3636 $wgSpecialPages['GlobalBlock'] = 'SpecialGlobalBlock';

Follow-up revisions

RevisionCommit summaryAuthorDate
r60497Follow-up r60494: Forgot this one to rename.raymond09:48, 30 December 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r58192New hook getOtherBlockLogLink, called in Special:IPBlockList to show links to...raymond14:08, 27 October 2009

Status & tagging log