http://www.mediawiki.org/wiki/Special:Code/MediaWiki/58281
Revision: 58281 Author: raymond Date: 2009-10-28 19:57:35 +0000 (Wed, 28 Oct 2009) Log Message: ----------- Improvement to r58193: Hook checks for existence of a global block now. Modified Paths: -------------- trunk/extensions/GlobalBlocking/GlobalBlocking.class.php trunk/extensions/GlobalBlocking/GlobalBlocking.i18n.php Modified: trunk/extensions/GlobalBlocking/GlobalBlocking.class.php =================================================================== --- trunk/extensions/GlobalBlocking/GlobalBlocking.class.php 2009-10-28 19:45:06 UTC (rev 58280) +++ trunk/extensions/GlobalBlocking/GlobalBlocking.class.php 2009-10-28 19:57:35 UTC (rev 58281) @@ -299,11 +299,17 @@ * @return boolean true */ static function getBlockLogLink( &$msg, $ip ) { - # IP addresses can be blocked only. + // Fast return if it is a username. IP addresses can be blocked only. if ( !IP::isIPAddress( $ip ) ) { return true; } + $block = self::getGlobalBlockingBlock( $ip, true ); + if( !$block ) { + // Fast return if not globally blocked + return true; + } + wfLoadExtensionMessages( 'GlobalBlocking' ); $msg[] = Html::rawElement( 'span', Modified: trunk/extensions/GlobalBlocking/GlobalBlocking.i18n.php =================================================================== --- trunk/extensions/GlobalBlocking/GlobalBlocking.i18n.php 2009-10-28 19:45:06 UTC (rev 58280) +++ trunk/extensions/GlobalBlocking/GlobalBlocking.i18n.php 2009-10-28 19:57:35 UTC (rev 58281) @@ -110,7 +110,7 @@ 'globalblocking-modify-logentry' => 'modified the global block on [[$1]] ($2)', 'globalblocking-logentry-expiry' => 'expires $1', 'globalblocking-logentry-noexpiry' => 'no expiry set', - 'globalblocking-loglink' => 'Check the global block status of the IP address [[{{#Special:GlobalBlockList}}/$1|$1]].', + 'globalblocking-loglink' => 'The IP address $1 is blocked globally ([[{{#Special:GlobalBlockList}}/$1|full details]]).', 'globalblocklist' => 'List of globally blocked IP addresses', 'globalblock' => 'Globally block an IP address', _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs