Index: trunk/extensions/GeoData/api/GeoDataQueryExtender.php |
— | — | @@ -60,8 +60,4 @@ |
61 | 61 | 'withoutcoordinates' => 'Return only pages without coordinates', |
62 | 62 | ); |
63 | 63 | } |
64 | | - |
65 | | - public static function getDescription() { |
66 | | - return ' (extended by the GeoData extension)'; |
67 | | - } |
68 | 64 | } |
Index: trunk/extensions/GeoData/api/ApiQueryAllPages_GeoData.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | if ( !$this->alreadyAltered ) { |
16 | 16 | $params = $this->extractRequestParams(); |
17 | 17 | |
18 | | - $this->requireMaxOneParameter( $params, 'withcoordinates', 'withoutcoordinates' ); |
| 18 | + $this->requireOnlyOneParameter( $params, 'withcoordinates', 'withoutcoordinates' ); |
19 | 19 | |
20 | 20 | list( $tables, $fields, $joins, $options, $where ) = |
21 | 21 | GeoDataQueryExtender::alterQuery( $params, 'page_id', $this->useIndex ); |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | } |
45 | 45 | |
46 | 46 | public function getDescription() { |
47 | | - return parent::getDescription() . GeoDataQueryExtender::getDescription(); |
| 47 | + return 'Lists pages with or without coordinates'; |
48 | 48 | } |
49 | 49 | |
50 | 50 | public function getAllowedParams() { |
Index: trunk/extensions/GeoData/api/ApiQueryCategoryMembers_GeoData.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | if ( !$this->alreadyAltered ) { |
16 | 16 | $params = $this->extractRequestParams(); |
17 | 17 | |
18 | | - $this->requireMaxOneParameter( $params, 'withcoordinates', 'withoutcoordinates' ); |
| 18 | + $this->requireOnlyOneParameter( $params, 'withcoordinates', 'withoutcoordinates' ); |
19 | 19 | |
20 | 20 | list( $tables, $fields, $joins, $options, $where ) = |
21 | 21 | GeoDataQueryExtender::alterQuery( $params, 'cl_from', $this->useIndex ); |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | } |
45 | 45 | |
46 | 46 | public function getDescription() { |
47 | | - return parent::getDescription() . GeoDataQueryExtender::getDescription(); |
| 47 | + return 'Lists pages with or without coordinates in a given category'; |
48 | 48 | } |
49 | 49 | |
50 | 50 | public function getAllowedParams() { |
Index: trunk/extensions/GeoData/GeoData.php |
— | — | @@ -30,11 +30,9 @@ |
31 | 31 | |
32 | 32 | $wgAPIListModules['geosearch'] = 'ApiQueryGeoSearch'; |
33 | 33 | $wgAPIPropModules['coordinates'] = 'ApiQueryCoordinates'; |
| 34 | +$wgAPIListModules['geopages'] = 'ApiQueryAllPages_GeoData'; |
| 35 | +$wgAPIListModules['geopagesincategory'] = 'ApiQueryCategoryMembers_GeoData'; |
34 | 36 | |
35 | | -// overriding core |
36 | | -$wgAPIListModules['allpages'] = 'ApiQueryAllPages_GeoData'; |
37 | | -$wgAPIListModules['categorymembers'] = 'ApiQueryCategoryMembers_GeoData'; |
38 | | - |
39 | 37 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'GeoDataHooks::onLoadExtensionSchemaUpdates'; |
40 | 38 | $wgHooks['ParserFirstCallInit'][] = 'GeoDataHooks::onParserFirstCallInit'; |
41 | 39 | $wgHooks['UnitTestsList'][] = 'GeoDataHooks::onUnitTestsList'; |