Yaron Koren has uploaded a new change for review.

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

Change subject: (Re-)allowed display of date precision fields in queries
......................................................................

(Re-)allowed display of date precision fields in queries

Change-Id: Idd6a331457e858147ea75a61d4a036d79eb1e9e4
---
M CargoSQLQuery.php
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/05/256005/1

diff --git a/CargoSQLQuery.php b/CargoSQLQuery.php
index 3e3e368..f9e155f 100644
--- a/CargoSQLQuery.php
+++ b/CargoSQLQuery.php
@@ -434,6 +434,14 @@
                                        // helper fields.
                                        $description->mType = 'Coordinates 
part';
                                        $tableName = '';
+                               } elseif ( substr( $fieldName, -11 ) == 
'__precision' ) {
+                                       // Special handling for lat/lon
+                                       // helper fields.
+                                       // @TODO - we need validation on
+                                       // __lat, __lon and __precision fields,
+                                       // to make sure that they exist.
+                                       $description->mType = 'Date precision';
+                                       $tableName = '';
                                } else {
                                        // Go through all the fields, until we
                                        // find the one matching this one.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd6a331457e858147ea75a61d4a036d79eb1e9e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <yaro...@gmail.com>

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

Reply via email to