Index: trunk/extensions/ArticleFeedback/api/ApiQueryArticleFeedback.php |
— | — | @@ -117,21 +117,20 @@ |
118 | 118 | global $wgArticleFeedbackRatings; |
119 | 119 | |
120 | 120 | $res = $this->getDB()->select( |
121 | | - 'article_feedback_revisions', |
| 121 | + 'article_feedback_pages', |
122 | 122 | array( |
123 | | - 'afr_rating_id', |
124 | | - 'SUM(afr_count) as count', |
| 123 | + 'aap_rating_id', |
| 124 | + 'aap_count', |
125 | 125 | ), |
126 | 126 | array( |
127 | | - 'afr_page_id' => $params['pageid'], |
128 | | - 'afr_rating_id' => $wgArticleFeedbackRatings, |
| 127 | + 'aap_page_id' => $params['pageid'], |
| 128 | + 'aap_rating_id' => $wgArticleFeedbackRatings, |
129 | 129 | ), |
130 | | - __METHOD__, |
131 | | - array( 'GROUP BY' => 'afr_rating_id') |
| 130 | + __METHOD__ |
132 | 131 | ); |
133 | 132 | $counts = array(); |
134 | 133 | foreach ( $res as $row ) { |
135 | | - $counts[$row->afr_rating_id] = $row->count; |
| 134 | + $counts[$row->aap_rating_id] = $row->aap_count; |
136 | 135 | } |
137 | 136 | return $counts; |
138 | 137 | } |