jenkins-bot has submitted this change and it was merged.
Change subject: Ditch compatibility with older MW versions
......................................................................
Ditch compatibility with older MW versions
Change-Id: I926868dea739944b9e2eb0398d4d01abab80a85a
---
M api/ApiQueryCoordinates.php
M api/ApiQueryGeoSearch.php
2 files changed, 3 insertions(+), 76 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/api/ApiQueryCoordinates.php b/api/ApiQueryCoordinates.php
index f7002a5..07c3903 100644
--- a/api/ApiQueryCoordinates.php
+++ b/api/ApiQueryCoordinates.php
@@ -126,8 +126,7 @@
),
'continue' => array(
ApiBase::PARAM_TYPE => 'string',
- /** @todo Once support for MediaWiki < 1.25 is
dropped, just use ApiBase::PARAM_HELP_MSG directly */
- constant( 'ApiBase::PARAM_HELP_MSG' ) ?: '' =>
'api-help-param-continue',
+ ApiBase::PARAM_HELP_MSG =>
'api-help-param-continue',
),
'prop' => array(
ApiBase::PARAM_TYPE => array( 'type', 'name',
'dim', 'country', 'region', 'globe' ),
@@ -140,45 +139,13 @@
),
'distancefrompoint' => array(
ApiBase::PARAM_TYPE => 'string',
- /** @todo Once support for MediaWiki < 1.25 is
dropped, just use ApiBase::PARAM_HELP_MSG_APPEND directly */
- constant( 'ApiBase::PARAM_HELP_MSG_APPEND' ) ?:
'' => array(
+ ApiBase::PARAM_HELP_MSG_APPEND => array(
'geodata-api-help-coordinates-format',
),
),
'distancefrompage' => array(
ApiBase::PARAM_TYPE => 'string',
),
- );
- }
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getParamDescription() {
- return array(
- 'limit' => 'How many coordinates to return',
- 'continue' => 'When more results are available, use
this to continue',
- 'prop' => 'What additional coordinate properties to
return',
- 'primary' => "Whether to return only primary
coordinates (``primary''), secondary (``secondary'') or both (``all'')",
- 'distancefrompoint' => 'Return distance in meters of
every result on Earth from these coordinates: latitude and longitude separated
by pipe (|)',
- 'distancefrompage' => 'Return distance in meters of
every result on Earth from the coordinates of this page',
- );
- }
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getDescription() {
- return 'Returns coordinates of the given page(s)';
- }
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getExamples() {
- return array(
- 'Get a list of coordinates of the [[Main Page]]:',
- '
api.php?action=query&prop=coordinates&titles=Main%20Page',
);
}
diff --git a/api/ApiQueryGeoSearch.php b/api/ApiQueryGeoSearch.php
index 45367a4..d649778 100644
--- a/api/ApiQueryGeoSearch.php
+++ b/api/ApiQueryGeoSearch.php
@@ -109,8 +109,7 @@
$params = array (
'coord' => array(
ApiBase::PARAM_TYPE => 'string',
- /** @todo Once support for MediaWiki < 1.25 is
dropped, just use ApiBase::PARAM_HELP_MSG_APPEND directly */
- constant( 'ApiBase::PARAM_HELP_MSG_APPEND' ) ?:
'' => array(
+ ApiBase::PARAM_HELP_MSG_APPEND => array(
'geodata-api-help-coordinates-format',
),
),
@@ -160,45 +159,6 @@
);
}
return $params;
- }
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getParamDescription() {
- global $wgDefaultGlobe, $wgGeoDataDebug;
- $params = array(
- 'coord' => 'Coordinate around which to search: two
floating-point values separated by pipe (|)',
- 'page' => 'Title of page around which to search',
- 'radius' => 'Search radius in meters',
- 'maxdim' => 'Restrict search to objects no larger than
this, in meters',
- 'limit' => 'Maximum number of pages to return',
- 'globe' => "Globe to search on (by default
``{$wgDefaultGlobe}'')",
- 'namespace' => 'Namespace(s) to search',
- 'prop' => 'What additional coordinate properties to
return',
- 'primary' => "Whether to return only primary
coordinates (``primary''), secondary (``secondary'') or both (``all'')"
- );
- if ( $wgGeoDataDebug ) {
- $params['debug'] = 'Whether debug information should be
returned';
- }
- return $params;
- }
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getDescription() {
- return 'Returns pages around the given point';
- }
-
- /**
- * @deprecated since MediaWiki core 1.25
- */
- public function getExamples() {
- return array(
-
"api.php?action=query&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677"
=>
- "Search around the point with coordinates 37°
47′ 13.1″ N, 122° 23′ 58.84″ W",
- );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/258380
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I926868dea739944b9e2eb0398d4d01abab80a85a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits