Yaron Koren has uploaded a new change for review.

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

Change subject: Removed Date handling from getAllOrValues()
......................................................................

Removed Date handling from getAllOrValues()

Change-Id: I2eeeba15028f7c787ef735ab9008b8d447a0da35
---
M drilldown/CargoAppliedFilter.php
1 file changed, 0 insertions(+), 14 deletions(-)


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

diff --git a/drilldown/CargoAppliedFilter.php b/drilldown/CargoAppliedFilter.php
index 9f81a77..ab00fd2 100644
--- a/drilldown/CargoAppliedFilter.php
+++ b/drilldown/CargoAppliedFilter.php
@@ -155,20 +155,6 @@
                        $value_field = $this->filter->name;
                }
 
-               if ( $this->filter->fieldDescription->mType == 'Date' ) {
-                       // Is this necessary?
-                       $date_field = $value_field;
-                       if ( $this->filter->getTimePeriod() == 'month' ) {
-                               $value_field = "YEAR($date_field), 
MONTH($date_field)";
-                       } elseif ( $this->filter->getTimePeriod() == 'day' ) {
-                               $value_field = "YEAR($date_field), 
MONTH($date_field), DAYOFMONTH($date_field)";
-                       } elseif ( $this->filter->getTimePeriod() == 'year' ) {
-                               $value_field = "YEAR($date_field)";
-                       } else { // if ( $this->filter->getTimePeriod() == 
'year range' ) {
-                               $value_field = "YEAR($date_field)";
-                       }
-               }
-
                $cdb = CargoUtils::getDB();
                $res = $cdb->select( $tableName, "DISTINCT " . $value_field );
                while ( $row = $cdb->fetchRow( $res ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2eeeba15028f7c787ef735ab9008b8d447a0da35
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