r95534 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95533‎ | r95534 | r95535 >
Date:21:53, 25 August 2011
Author:reedy
Status:deferred
Tags:
Comment:
Remove prefixes not used

Simplify some code
Modified paths:
  • /trunk/extensions/MetricsReporting/ApiAnalyticsBase.php (modified) (history)
  • /trunk/extensions/MetricsReporting/metrics/DumpActiveEditors100Metric.php (modified) (history)
  • /trunk/extensions/MetricsReporting/metrics/EditorsByGeographyMetric.php (modified) (history)
  • /trunk/extensions/MetricsReporting/metrics/GenericMetricBase.php (modified) (history)
  • /trunk/extensions/MetricsReporting/metrics/SquidPageViewsMetric.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MetricsReporting/ApiAnalyticsBase.php
@@ -9,8 +9,8 @@
1010
1111 protected $isCurrentlyNormalised = false;
1212
13 - public function __construct( ApiBase $query, $moduleName, $paramPrefix = '' ) {
14 - parent::__construct( $query->getMain(), $moduleName, $paramPrefix );
 13+ public function __construct( ApiBase $query, $moduleName ) {
 14+ parent::__construct( $query->getMain(), $moduleName );
1515 }
1616
1717 /**
Index: trunk/extensions/MetricsReporting/metrics/SquidPageViewsMetric.php
@@ -2,8 +2,8 @@
33
44 class SquidPageViewsMetric extends ApiAnalyticsBase {
55
6 - public function __construct( ApiBase $query, $moduleName, $paramPrefix = '' ) {
7 - parent::__construct( $query->getMain(), $moduleName, $paramPrefix );
 6+ public function __construct( ApiBase $query, $moduleName ) {
 7+ parent::__construct( $query->getMain(), $moduleName );
88
99 $this->normaliseQueryParameters();
1010 }
Index: trunk/extensions/MetricsReporting/metrics/GenericMetricBase.php
@@ -13,14 +13,11 @@
1414 /**
1515 * @param $query ApiBase
1616 * @param $moduleName
17 - * @param $paramPrefix string
18 - * @param $tableName string
1917 * @return GenericMetricBase
2018 *
2119 */
22 - function __construct( ApiBase $query, $moduleName, $paramPrefix = '', $tableName ) {
23 - parent::__construct( $query->getMain(), $moduleName, $paramPrefix );
24 - $this->tableName = $tableName;
 20+ function __construct( ApiBase $query, $moduleName ) {
 21+ parent::__construct( $query->getMain(), $moduleName );
2522 }
2623
2724 public function getAllowedFilters() {
Index: trunk/extensions/MetricsReporting/metrics/EditorsByGeographyMetric.php
@@ -4,13 +4,9 @@
55 *
66 */
77 class EditorsByGeographyMetric extends GenericMetricBase {
8 - /**
9 - * @param $tableName string
10 - */
11 - function __construct( ApiBase $query, $moduleName, $paramPrefix = '', $tableName ) {
12 - parent::__construct( $query->getMain(), $moduleName, $paramPrefix, 'editorsbygeography' );
13 - }
148
 9+ protected $tableName = 'editorsbygeography';
 10+
1511 public function getDescription() {
1612 return "Number of active unique registered editors by country";
1713 }
Index: trunk/extensions/MetricsReporting/metrics/DumpActiveEditors100Metric.php
@@ -2,8 +2,8 @@
33
44 class DumpActiveEditors100Metric extends DumpActiveEditors5Metric {
55
6 - public function __construct( ApiBase $query, $moduleName, $paramPrefix = '' ) {
7 - parent::__construct( $query->getMain(), $moduleName, $paramPrefix );
 6+ public function __construct( ApiBase $query, $moduleName ) {
 7+ parent::__construct( $query->getMain(), $moduleName );
88 $this->numberOfActiveEditors = 100;
99 }
1010

Status & tagging log