https://www.mediawiki.org/wiki/Special:Code/MediaWiki/111037
Revision: 111037 Author: ashley Date: 2012-02-09 14:46:50 +0000 (Thu, 09 Feb 2012) Log Message: ----------- Comments: fix bug #34281 -- don't show "reply" links to unprivileged users. Patch by Van de Bugger. Modified Paths: -------------- trunk/extensions/Comments/CommentClass.php Modified: trunk/extensions/Comments/CommentClass.php =================================================================== --- trunk/extensions/Comments/CommentClass.php 2012-02-09 14:41:15 UTC (rev 111036) +++ trunk/extensions/Comments/CommentClass.php 2012-02-09 14:46:50 UTC (rev 111037) @@ -779,13 +779,15 @@ // Reply Link (does not appear on child comments) $replyRow = ''; - if( $comment['Comment_Parent_ID'] == 0 ) { - if( $replyRow ) { - $replyRow .= ' | '; + if ( $wgUser->isAllowed( 'comment' ) ) { + if( $comment['Comment_Parent_ID'] == 0 ) { + if( $replyRow ) { + $replyRow .= ' | '; + } + $replyRow .= " | <a href=\"#end\" rel=\"nofollow\" class=\"comments-reply-to\" data-comment-id=\"{$comment['CommentID']}\" data-comments-safe-username=\"" . + htmlspecialchars( $CommentReplyTo, ENT_QUOTES ) . '">' . + wfMsg( 'comment-reply' ) . '</a>'; } - $replyRow .= " | <a href=\"#end\" rel=\"nofollow\" class=\"comments-reply-to\" data-comment-id=\"{$comment['CommentID']}\" data-comments-safe-username=\"" . - htmlspecialchars( $CommentReplyTo, ENT_QUOTES ) . '">' . - wfMsg( 'comment-reply' ) . '</a>'; } if( $comment['Comment_Parent_ID'] == 0 ) { _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs