Index: trunk/extensions/MetricsReporting/ApiAnalyticsBase.php |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | . " AND date <= " . $db->addQuotes( $params['endmonth'] ) ; |
48 | 48 | } |
49 | 49 | |
50 | | - if ( $params['normalized'] ) { |
| 50 | + if ( $params['normalized'] && $this->canBeNormalised() ) { |
51 | 51 | // TODO: Do data normalisation stuffs here |
52 | 52 | } |
53 | 53 | |
— | — | @@ -66,6 +66,10 @@ |
67 | 67 | } |
68 | 68 | } |
69 | 69 | // TODO: Change join based on selected language $params['reportlanguage'] |
| 70 | + // TODO: Also, work out which queries can deal with the parameter |
| 71 | + //if () { |
| 72 | + // $query['conds']['reportlanguage'] = $params['reportlanguage']; |
| 73 | + //} |
70 | 74 | |
71 | 75 | foreach( $this->getAllowedFilters() as $filter ) { |
72 | 76 | if ( /*isset( $params[$filter] ) && */count( $params[$filter] ) ) { |
— | — | @@ -179,6 +183,13 @@ |
180 | 184 | protected abstract function getQueryFields(); |
181 | 185 | |
182 | 186 | /** |
| 187 | + * @return bool |
| 188 | + */ |
| 189 | + protected function canBeNormalised() { |
| 190 | + return false; |
| 191 | + } |
| 192 | + |
| 193 | + /** |
183 | 194 | * @return array |
184 | 195 | */ |
185 | 196 | public function getAllowedFilters() { |
Index: trunk/extensions/MetricsReporting/metrics/SquidPageViewsMetric.php |
— | — | @@ -26,6 +26,10 @@ |
27 | 27 | return array(); |
28 | 28 | } |
29 | 29 | |
| 30 | + protected function canBeNormalised() { |
| 31 | + return true; |
| 32 | + } |
| 33 | + |
30 | 34 | public function getDescription() { |
31 | 35 | return array( |
32 | 36 | 'Total articles (htm component) requested from nearly all Wikimedia wikis (exceptions are mostly special purpose wikis, e.g. wikimania wikis)', |