r86000 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85999‎ | r86000 | r86001 >
Date:23:02, 13 April 2011
Author:catrope
Status:ok
Tags:
Comment:
ArticleFeedback: Followup r85998: per Trevor, don't count ratings with value zero
Modified paths:
  • /trunk/extensions/ArticleFeedback/populateAFRevisions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/populateAFRevisions.php
@@ -103,7 +103,9 @@
104104 if ( !isset( $data2[$userData['revid']]['ratings'][$id] ) ) {
105105 $data2[$userData['revid']]['ratings'][$id] = array( 'count' => 0, 'total' => 0 );
106106 }
107 - $data2[$userData['revid']]['ratings'][$id]['count']++;
 107+ if ( $value > 0 ) {
 108+ $data2[$userData['revid']]['ratings'][$id]['count']++;
 109+ }
108110 $data2[$userData['revid']]['ratings'][$id]['total'] += $value;
109111 }
110112 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85998ArticleFeedback: Add population script for article_feedback_revisions tablecatrope22:57, 13 April 2011

Status & tagging log