Index: trunk/extensions/ArticleFeedback/populateAFStatistics.php |
— | — | @@ -192,6 +192,10 @@ |
193 | 193 | $count = 0; |
194 | 194 | foreach( $problems as $page_id ) { |
195 | 195 | $page = $this->pages->getPage( $page_id ); |
| 196 | + // calculate the rating averages if they haven't already been calculated |
| 197 | + if ( !count( $page->rating_averages )) { |
| 198 | + $page->calculateRatingAverages(); |
| 199 | + } |
196 | 200 | $rows[] = array( |
197 | 201 | 'afs_page_id' => $page_id, |
198 | 202 | 'afs_orderable_data' => $page->overall_average, |