Index: trunk/extensions/MetricsReporting/MetricsReporting.php |
— | — | @@ -64,3 +64,6 @@ |
65 | 65 | |
66 | 66 | $wgAutoloadClasses['SquidPageViewsMetric'] = $metricsDir . 'SquidPageViewsMetric.php'; |
67 | 67 | $wgMetricAPIModules['squidpageviews'] = 'SquidPageViewsMetric'; |
| 68 | + |
| 69 | +$wgAutoloadClasses['EditorsByGeographyMetric'] = $metricsDir . 'EditorsByGeographyMetric.php'; |
| 70 | +$wgMetricAPIModules['editorsbygeography'] = 'EditorsByGeographyMetric'; |
Index: trunk/extensions/MetricsReporting/metrics/EditorsByGeographyMetric.php |
— | — | @@ -1,22 +1,16 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
5 | | - * Subclass this, pass the table name to the constructor, then just override |
6 | | - * the getDescription and getExamples functions |
7 | 5 | * |
8 | | - * Then add it to the loader |
9 | 6 | */ |
10 | 7 | class EditorsByGeographyMetric extends GenericMetricBase { |
11 | | - |
12 | | - |
13 | 8 | /** |
14 | 9 | * @param $tableName string |
15 | 10 | */ |
16 | 11 | function __construct() { |
17 | | - parent::__construct("editorsbygeography"); |
| 12 | + parent::__construct( 'editorsbygeography' ); |
18 | 13 | } |
19 | 14 | |
20 | | - |
21 | 15 | public function getDescription(){ |
22 | 16 | return "Number of active unique registered editors by country"; |
23 | 17 | } |
— | — | @@ -24,6 +18,4 @@ |
25 | 19 | protected function getExamples(){ |
26 | 20 | return ""; |
27 | 21 | } |
28 | | - |
29 | | - |
30 | 22 | } |
\ No newline at end of file |