r111059 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111058‎ | r111059 | r111060 >
Date:18:52, 9 February 2012
Author:mah
Status:ok (Comments)
Tags:nodeploy 
Comment:
Fixes Bug 34301 - Comments: Vote buttons for users without "comment" right.
Modified paths:
  • /trunk/extensions/Comments/CommentClass.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Comments/CommentClass.php
@@ -675,6 +675,9 @@
676676 if( $wgUser->isBlocked() ) {
677677 return '';
678678 }
 679+ if ( ! $wgUser->isAllowed( 'comment' ) ) {
 680+ return '';
 681+ }
679682
680683 $voteLink = '';
681684 if ( $wgUser->isLoggedIn() ) {

Comments

#Comment by Jack Phoenix (talk | contribs)   20:08, 9 February 2012

Looks sane, just one minor coding style nitpick: the MW convention is to have no space between the exclamation mark and the variable name, but I can fix that later on.

Status & tagging log