Index: trunk/extensions/MetricsReporting/metrics/ComScoreUniqueVisitorMetric.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | |
33 | 33 | protected function getExamples() { |
34 | 34 | return array( |
35 | | - 'api.php?action=analytics&metric=', |
| 35 | + 'api.php?action=analytics&metric=comscoreuniquevisitors', |
36 | 36 | ); |
37 | 37 | } |
38 | 38 | |
Index: trunk/extensions/MetricsReporting/ApiAnalytics.php |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | global $wgMetricAPIModules; |
18 | 18 | // Instantiate requested modules |
19 | 19 | $modules = array(); |
20 | | - $this->instantiateModules( $modules, 'prop', $wgMetricAPIModules ); |
| 20 | + $this->instantiateModules( $modules, 'metric', $wgMetricAPIModules ); |
21 | 21 | |
22 | 22 | // Execute all requested modules. |
23 | 23 | foreach ( $modules as $module ) { |
— | — | @@ -41,11 +41,10 @@ |
42 | 42 | } |
43 | 43 | |
44 | 44 | public function getAllowedParams() { |
45 | | - global $wgMetricAPIModules; |
46 | 45 | return array( |
47 | 46 | 'metric' => array( |
48 | 47 | ApiBase::PARAM_ISMULTI => false, |
49 | | - ApiBase::PARAM_TYPE => $wgMetricAPIModules, |
| 48 | + ApiBase::PARAM_TYPE => $this->metricModuleNames, |
50 | 49 | ApiBase::PARAM_REQUIRED => true, |
51 | 50 | ), |
52 | 51 | ); |