r44522 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44521‎ | r44522 | r44523 >
Date:03:42, 13 December 2008
Author:werdna
Status:ok
Tags:
Comment:
Simplify permissions check
Modified paths:
  • /trunk/extensions/AbuseFilter/SpecialAbuseFilter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/SpecialAbuseFilter.php
@@ -680,7 +680,7 @@
681681 static $canEdit = 'unset';
682682
683683 if ($canEdit == 'unset') {
684 - $canEdit = !count( $errors = $this->getTitle()->getUserPermissionsErrors( 'abusefilter-modify', $wgUser, true, array( 'ns-specialprotected' ) ) );
 684+ $canEdit = $wgUser->isAllowed( 'abusefilter-modify' );
685685 }
686686
687687 return $canEdit;

Status & tagging log