User "Catrope" changed the status of MediaWiki.r85575.

Old Status: new
New Status: fixme

User "Catrope" also posted a comment on MediaWiki.r85575.

Full URL: 
https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/85575#c15892

Comment:

Trevor and I discussed this, putting it in here for future reference:
<pre>
+       protected function getHistoricCounts( $params ) {
+               global $wgArticleFeedbackRatings;
+               
+               $res = $this->getDB()->select(
+                       'article_feedback_pages',
+                       array(
+                               'aap_rating_id',
+                               'SUM(aap_count) as count',
+                       ),
+                       array(
+                               'aap_page_id' => $params['pageid'],
+                               'aap_rating_id' => $wgArticleFeedbackRatings,
+                       ),
+                       __METHOD__,
+                       array( 'GROUP BY' => 'aap_rating_id')
+               );
+               $counts = array();
+               foreach ( $res as $row ) {
+                       $counts[$row->aap_rating_id] = $row->count;
+               }
+               return $counts;
+       }
</pre>
This needs to go in a summary table for efficient querying. Now that we have a 
use case for per-page summary data, we might as well restore 
article_feedback_pages to its original role of tracking per-page data, and move 
the per-revision tracking to a separate table.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to