r33006 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r33005‎ | r33006 | r33007 >
Date:02:32, 9 April 2008
Author:aaron
Status:old
Tags:
Comment:
Only get edit count if $redContribsWhenNoEdits is true
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -857,9 +857,9 @@
858858 }
859859 if( $userId ) {
860860 // check if the user has an edit
861 - $count = !is_null($edits) ? $edits : User::edits( $userId );
862 - if( $redContribsWhenNoEdits && $count == 0 ) {
863 - $style = " class='new'";
 861+ if( $redContribsWhenNoEdits ) {
 862+ $count = !is_null($edits) ? $edits : User::edits( $userId );
 863+ $style = ($count == 0) ? " class='new'" : '';
864864 } else {
865865 $style = '';
866866 }

Status & tagging log