DCausse has uploaded a new change for review.

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

Change subject: Set PARAM_DFLT to RADIUS_MIN for radius
......................................................................

Set PARAM_DFLT to RADIUS_MIN for radius

When running with no radius param 0 seems to be used. Unfortunately
it causes a failure in elastic:
  IllegalArgumentException: invalid radiusMeters 0.0

Set PARAM_DFLT to MIN_RADIUS so that the MIN/MAX range is always
respected.

Change-Id: Iec08f60dd0d8fbf196e554d116354846f3c9e1a9
---
M includes/api/ApiQueryGeoSearch.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GeoData 
refs/changes/74/313974/1

diff --git a/includes/api/ApiQueryGeoSearch.php 
b/includes/api/ApiQueryGeoSearch.php
index 7b7269d..b249141 100644
--- a/includes/api/ApiQueryGeoSearch.php
+++ b/includes/api/ApiQueryGeoSearch.php
@@ -144,6 +144,7 @@
                                ApiBase::PARAM_MIN => self::MIN_RADIUS,
                                ApiBase::PARAM_MAX => $wgMaxGeoSearchRadius,
                                ApiBase::PARAM_RANGE_ENFORCE => true,
+                               ApiBase::PARAM_DFLT => self::MIN_RADIUS,
                        ],
                        'maxdim' => [
                                ApiBase::PARAM_TYPE => 'integer',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec08f60dd0d8fbf196e554d116354846f3c9e1a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: DCausse <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to