Index: trunk/extensions/FlaggedRevs/api/ApiFlagConfig.php |
— | — | @@ -30,15 +30,17 @@ |
31 | 31 | |
32 | 32 | public function execute() { |
33 | 33 | $this->getMain()->setCacheMode( 'public' ); |
34 | | - global $wgFlaggedRevTags; |
| 34 | + $minQLTags = FlaggedRevs::quickTags( FR_QUALITY ); |
| 35 | + $minPLTags = FlaggedRevs::quickTags( FR_PRISTINE ); |
35 | 36 | $data = array(); |
36 | | - foreach ( $wgFlaggedRevTags as $tag => $params ) { |
37 | | - $tagInfo = array(); |
38 | | - $tagInfo['name'] = $tag; |
39 | | - $tagInfo['levels'] = $params['levels']; |
40 | | - $tagInfo['tier2'] = $params['quality']; |
41 | | - $tagInfo['tier3'] = $params['pristine']; |
42 | | - $data[] = $tagInfo; |
| 37 | + foreach ( FlaggedRevs::getDimensions() as $tag => $levels ) { |
| 38 | + $data[] = array( |
| 39 | + 'name' => $tag, |
| 40 | + 'levels' => count( $levels ) - 1, // exclude '0' level |
| 41 | + 'tier1' => 1, |
| 42 | + 'tier2' => $minQLTags[$tag], |
| 43 | + 'tier3' => $minPLTags[$tag] |
| 44 | + ); |
43 | 45 | } |
44 | 46 | $result = $this->getResult(); |
45 | 47 | $result->setIndexedTagName( $data, 'tag' ); |