r101331 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101330‎ | r101331 | r101332 >
Date:00:37, 31 October 2011
Author:cryptocoryne
Status:ok
Tags:
Comment:
small fixes according to ashley's review
Modified paths:
  • /trunk/extensions/AutoProxyBlock/AutoProxyBlock.body.php (modified) (history)
  • /trunk/extensions/AutoProxyBlock/AutoProxyBlock.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AutoProxyBlock/AutoProxyBlock.body.php
@@ -63,20 +63,20 @@
6464 if( self::isProxy( $userIP ) ) {
6565 if( $wgAutoProxyBlockLog ) {
6666 $log = new LogPage( 'proxyblock' );
67 - $log->addEntry( 'blocked', $title, false, array( $action, $user->mName ) );
 67+ $log->addEntry( 'blocked', $title, false, array( $action, $user->getName() ) );
6868
6969 // hack for 1.19-
7070 $dbw = wfGetDB( DB_MASTER );
71 - $userID = User::newFromName( 'AutoProxyBlock' );
 71+ $blocker = User::newFromName( 'AutoProxyBlock' );
7272 $dbw->update(
7373 'logging',
74 - array( 'log_user' => $userID->getID(), 'log_user_text' => 'AutoProxyBlock' ),
75 - array( 'log_type' => 'proxyblock', 'log_user_text' => $user->mName ),
 74+ array( 'log_user' => $blocker->getID(), 'log_user_text' => 'AutoProxyBlock' ),
 75+ array( 'log_type' => 'proxyblock', 'log_user_text' => $user->getName() ),
7676 __METHOD__,
7777 array( 'ORDER BY' => 'log_timestamp DESC' )
7878 );
7979 }
80 - $result[] = array( 'proxy-blocked', $IP );
 80+ $result[] = array( 'proxy-blocked', $userIP );
8181 return false;
8282 }
8383
Index: trunk/extensions/AutoProxyBlock/AutoProxyBlock.php
@@ -8,7 +8,7 @@
99 'path' => __FILE__,
1010 'name' => 'AutoProxyBlock',
1111 'author' => 'Cryptocoryne',
12 - 'version' => '0.9',
 12+ 'version' => '1.0',
1313 'descriptionmsg' => 'autoproxyblock-desc',
1414 'url' => 'http://www.mediawiki.org/wiki/Extension:AutoProxyBlock',
1515 );

Status & tagging log