Index: trunk/extensions/ArticleAssessmentPilot/api/ApiQueryArticleAssessment.php |
— | — | @@ -5,6 +5,7 @@ |
6 | 6 | } |
7 | 7 | |
8 | 8 | public function execute() { |
| 9 | + global $wgArticleAssessmentRatings; |
9 | 10 | $params = $this->extractRequestParams(); |
10 | 11 | |
11 | 12 | $result = $this->getResult(); |
— | — | @@ -16,6 +17,7 @@ |
17 | 18 | $this->addJoinConds( array( |
18 | 19 | 'article_assessment_ratings' => array( 'LEFT JOIN', array( |
19 | 20 | 'aar_id=aap_rating_id', |
| 21 | + 'aap_rating_id' => $wgArticleAssessmentRatings, |
20 | 22 | ) |
21 | 23 | ), |
22 | 24 | ) ); |
— | — | @@ -52,8 +54,6 @@ |
53 | 55 | |
54 | 56 | $this->addOption( 'ORDER BY', 'aa_revision DESC' ); |
55 | 57 | } |
56 | | - |
57 | | - global $wgArticleAssessmentRatings; |
58 | 58 | |
59 | 59 | $this->addOption( 'LIMIT', count( $wgArticleAssessmentRatings ) ); |
60 | 60 | |
Index: trunk/extensions/ArticleAssessmentPilot/api/ApiArticleAssessment.php |
— | — | @@ -20,8 +20,6 @@ |
21 | 21 | } |
22 | 22 | |
23 | 23 | $dbr = wfGetDB( DB_SLAVE ); |
24 | | - |
25 | | - global $wgArticleAssessmentRatings; |
26 | 24 | |
27 | 25 | // Query the latest ratings by this user for this page, |
28 | 26 | // possibly for an older revision |
— | — | @@ -35,6 +33,7 @@ |
36 | 34 | 'aa_user_id' => $wgUser->getId(), |
37 | 35 | 'aa_user_text' => $wgUser->getName(), |
38 | 36 | 'aa_page_id' => $params['pageid'], |
| 37 | + 'aa_rating_id' => $wgArticleAssessmentRatings, |
39 | 38 | ), |
40 | 39 | $token |
41 | 40 | ), |