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 @@
104
104
if ( !isset( $data2[$userData['revid']]['ratings'][$id] ) ) {
105
105
$data2[$userData['revid']]['ratings'][$id] = array( 'count' => 0, 'total' => 0 );
106
106
}
107
- $data2[$userData['revid']]['ratings'][$id]['count']++;
107
+ if ( $value > 0 ) {
108
+ $data2[$userData['revid']]['ratings'][$id]['count']++;
109
+ }
108
110
$data2[$userData['revid']]['ratings'][$id]['total'] += $value;
109
111
}
110
112
}
Past revisions this follows-up on
Revision
Commit summary
Author
Date
r85998
ArticleFeedback: Add population script for article_feedback_revisions table
catrope
22:57, 13 April 2011
Status & tagging log
23:03, 13 April 2011
Trevor Parscal (WMF)
(
talk
|
contribs
)
changed the
status
of r86000
[
removed:
new
added:
ok]