r92416 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92415‎ | r92416 | r92417 >
Date:21:14, 17 July 2011
Author:reedy
Status:deferred
Tags:
Comment:
Only show normalised parameter if query can be "normalised"
Modified paths:
  • /trunk/extensions/MetricsReporting/ApiAnalyticsBase.php (modified) (history)
  • /trunk/extensions/MetricsReporting/metrics/SquidPageViewsMetric.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MetricsReporting/ApiAnalyticsBase.php
@@ -264,7 +264,6 @@
265265 'endmonth' => array(
266266 ApiBase::PARAM_TYPE => 'string',
267267 ),
268 - 'normalized' => false,
269268 'data' => array(
270269 ApiBase::PARAM_DFLT => 'timeseries',
271270 ApiBase::PARAM_ISMULTI => true,
@@ -285,6 +284,10 @@
286285 ),
287286 );
288287
 288+ if ( $this->canBeNormalised() ) {
 289+ $params['normalized'] = false;
 290+ }
 291+
289292 $select = array(
290293 'selectregions' => array(
291294 ApiBase::PARAM_ISMULTI => true,
Index: trunk/extensions/MetricsReporting/metrics/SquidPageViewsMetric.php
@@ -23,7 +23,7 @@
2424 return array(
2525 'table' => array( 'page_views' ),
2626 'conds' => array(),
27 - 'options' => array( 'GROUP BY' => 'date', ),
 27+ 'options' => array( 'GROUP BY' => array( 'date' ) ),
2828 'join_conds' => array(),
2929 );
3030 }

Status & tagging log