Index: trunk/extensions/ArticleAssessmentPilot/api/ApiListArticleAssessment.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | ) ); |
29 | 29 | |
30 | 30 | if ( isset( $params['pageid'] ) ) { |
31 | | - $this->addWhereFld( 'aa_page_id', $params['pageid'] ); |
| 31 | + $this->addWhereFld( 'aap_page_id', $params['pageid'] ); |
32 | 32 | } |
33 | 33 | |
34 | 34 | if ( $params['userrating'] ) { |
— | — | @@ -57,10 +57,10 @@ |
58 | 58 | if ( isset( $params['revid'] ) ){ |
59 | 59 | $this->addWhereFld( 'aa_revision', $params['revid'] ); |
60 | 60 | } |
| 61 | + |
| 62 | + $this->addOption( 'ORDER BY', 'aa_revision DESC' ); |
61 | 63 | } |
62 | 64 | |
63 | | - $this->addOption( 'ORDER BY', 'aa_revision DESC' ); |
64 | | - |
65 | 65 | $limit = $params['limit']; |
66 | 66 | $this->addOption( 'LIMIT', $limit * 4 ); //4 "Ratings" |
67 | 67 | |
— | — | @@ -119,7 +119,7 @@ |
120 | 120 | |
121 | 121 | if ( $res ) { |
122 | 122 | $noOfRevs = $res->fetchRow()->norevs; |
123 | | - if ( $noOfRevs > $wgArticleAssessmentStaleCount ){ |
| 123 | + if ( $noOfRevs > $wgArticleAssessmentStaleCount ) { |
124 | 124 | //it's stale! |
125 | 125 | $ratings[$params['pageid']]['stale'] = intval( $noOfRevs ); |
126 | 126 | } |
— | — | @@ -162,7 +162,7 @@ |
163 | 163 | public function getParamDescription() { |
164 | 164 | return array( |
165 | 165 | 'pageid' => 'Page ID to get assessments for', |
166 | | - 'revid' => 'Specific revision to get (used in conjunction with userrating param, otherwise ignored. Needed for stale calculation)', |
| 166 | + 'revid' => 'Specific revision to get (used in conjunction with userrating param, otherwise ignored)', |
167 | 167 | 'userrating' => 'Whether to get the current users ratings for the specific rev/article', |
168 | 168 | 'anontoken' => 'Token for anonymous users', |
169 | 169 | 'limit' => 'Amount of pages to get the ratings for', |