r47460 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47459‎ | r47460 | r47461 >
Date:19:34, 18 February 2009
Author:werdna
Status:ok
Tags:
Comment:
Fix some silly bugs in reautoconfirmation
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.class.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/tools.js (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/Views/tools.js
@@ -21,7 +21,7 @@
2222 function processReautoconfirm( request ) {
2323 var response = request.responseText;
2424
25 - if (strlen(response)) {
 25+ if (response && response.length) {
2626 jsMsg( response );
2727 }
2828
Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php
@@ -238,7 +238,9 @@
239239 }
240240
241241 public static function ajaxReAutoconfirm( $username ) {
242 -
 242+ global $wgUser;
 243+ wfLoadExtensionMessages( 'AbuseFilter' );
 244+
243245 if (!$wgUser->isAllowed('abusefilter-modify')) {
244246 // Don't allow it.
245247 return wfMsg( 'abusefilter-reautoconfirm-notallowed' );

Status & tagging log