Yaron Koren has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316355

Change subject: Better CargoFilter constructor
......................................................................

Better CargoFilter constructor

Change-Id: I64bfba854cdd9c950d8981611427ea7e780a0321
---
M drilldown/CargoFilter.php
M drilldown/CargoSpecialDrilldown.php
2 files changed, 2 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/55/316355/2

diff --git a/drilldown/CargoFilter.php b/drilldown/CargoFilter.php
index 2a2e7d7..a5e1204 100644
--- a/drilldown/CargoFilter.php
+++ b/drilldown/CargoFilter.php
@@ -18,15 +18,9 @@
        public $required_filters = array();
        public $possible_applied_filters = array();
 
-       public function setName( $name ) {
+       function __construct( $name, $tableName, $fieldDescription ) {
                $this->name = $name;
-       }
-
-       public function setTableName( $tableName ) {
                $this->tableName = $tableName;
-       }
-
-       public function setFieldDescription( $fieldDescription ) {
                $this->fieldDescription = $fieldDescription;
        }
 
diff --git a/drilldown/CargoSpecialDrilldown.php 
b/drilldown/CargoSpecialDrilldown.php
index c766e50..aec7fa7 100644
--- a/drilldown/CargoSpecialDrilldown.php
+++ b/drilldown/CargoSpecialDrilldown.php
@@ -74,11 +74,7 @@
                                continue;
                        }
 
-                       $curFilter = new CargoFilter();
-                       $curFilter->setName( $fieldName );
-                       $curFilter->setTableName( $tableName );
-                       $curFilter->setFieldDescription( $fieldDescription );
-                       $all_filters[] = $curFilter;
+                       $all_filters[] = new CargoFilter( $fieldName, 
$tableName, $fieldDescription );
                }
 
                $filter_used = array();

-- 
To view, visit https://gerrit.wikimedia.org/r/316355
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I64bfba854cdd9c950d8981611427ea7e780a0321
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <yaro...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to