r85969 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85968‎ | r85969 | r85970 >
Date:18:13, 13 April 2011
Author:tparscal
Status:ok
Tags:
Comment:
Using article_feedback_pages for historical counts - sort of reverting some of the changes made in r85967, but not as simple as just that.
Modified paths:
  • /trunk/extensions/ArticleFeedback/api/ApiQueryArticleFeedback.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/api/ApiQueryArticleFeedback.php
@@ -117,21 +117,20 @@
118118 global $wgArticleFeedbackRatings;
119119
120120 $res = $this->getDB()->select(
121 - 'article_feedback_revisions',
 121+ 'article_feedback_pages',
122122 array(
123 - 'afr_rating_id',
124 - 'SUM(afr_count) as count',
 123+ 'aap_rating_id',
 124+ 'aap_count',
125125 ),
126126 array(
127 - 'afr_page_id' => $params['pageid'],
128 - 'afr_rating_id' => $wgArticleFeedbackRatings,
 127+ 'aap_page_id' => $params['pageid'],
 128+ 'aap_rating_id' => $wgArticleFeedbackRatings,
129129 ),
130 - __METHOD__,
131 - array( 'GROUP BY' => 'afr_rating_id')
 130+ __METHOD__
132131 );
133132 $counts = array();
134133 foreach ( $res as $row ) {
135 - $counts[$row->afr_rating_id] = $row->count;
 134+ $counts[$row->aap_rating_id] = $row->aap_count;
136135 }
137136 return $counts;
138137 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85967Switched use of article_feedback_pages to article_feedback_revisions - articl...tparscal18:06, 13 April 2011

Status & tagging log