r58281 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58280‎ | r58281 | r58282 >
Date:19:57, 28 October 2009
Author:raymond
Status:ok
Tags:
Comment:
Improvement to r58193: Hook checks for existence of a global block now.
Modified paths:
  • /trunk/extensions/GlobalBlocking/GlobalBlocking.class.php (modified) (history)
  • /trunk/extensions/GlobalBlocking/GlobalBlocking.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GlobalBlocking/GlobalBlocking.class.php
@@ -299,11 +299,17 @@
300300 * @return boolean true
301301 */
302302 static function getBlockLogLink( &$msg, $ip ) {
303 - # IP addresses can be blocked only.
 303+ // Fast return if it is a username. IP addresses can be blocked only.
304304 if ( !IP::isIPAddress( $ip ) ) {
305305 return true;
306306 }
307307
 308+ $block = self::getGlobalBlockingBlock( $ip, true );
 309+ if( !$block ) {
 310+ // Fast return if not globally blocked
 311+ return true;
 312+ }
 313+
308314 wfLoadExtensionMessages( 'GlobalBlocking' );
309315 $msg[] = Html::rawElement(
310316 'span',
Index: trunk/extensions/GlobalBlocking/GlobalBlocking.i18n.php
@@ -110,7 +110,7 @@
111111 'globalblocking-modify-logentry' => 'modified the global block on [[$1]] ($2)',
112112 'globalblocking-logentry-expiry' => 'expires $1',
113113 'globalblocking-logentry-noexpiry' => 'no expiry set',
114 - 'globalblocking-loglink' => 'Check the global block status of the IP address [[{{#Special:GlobalBlockList}}/$1|$1]].',
 114+ 'globalblocking-loglink' => 'The IP address $1 is blocked globally ([[{{#Special:GlobalBlockList}}/$1|full details]]).',
115115
116116 'globalblocklist' => 'List of globally blocked IP addresses',
117117 'globalblock' => 'Globally block an IP address',

Follow-up revisions

RevisionCommit summaryAuthorDate
r58282Merging r57450 through r58281 for arbcom election deployment.tstarling20:54, 28 October 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r58193Use the new hook from r58192: Create a link to the GlobalBlockLograymond14:10, 27 October 2009

Status & tagging log