Index: trunk/extensions/GeoData/ApiQueryGeoSearch.php |
— | — | @@ -73,6 +73,7 @@ |
74 | 74 | $this->addWhereRange( 'gt_lat', 'newer', $rect["minLat"], $rect["maxLat"], false ); |
75 | 75 | $this->addWhereRange( 'gt_lon', 'newer', $rect["minLon"], $rect["maxLon"], false ); |
76 | 76 | //$this->addWhere( 'dist < ' . intval( $radius ) ); hasta be in HAVING, not WHERE |
| 77 | + $this->addWhereFld( 'page_namespace', $params['namespace'] ); |
77 | 78 | $this->addWhere( 'gt_page_id = page_id' ); |
78 | 79 | if ( $exclude ) { |
79 | 80 | $this->addWhere( "gt_page_id <> {$exclude}" ); |
— | — | @@ -140,6 +141,11 @@ |
141 | 142 | ApiBase::PARAM_TYPE => 'string', |
142 | 143 | ApiBase::PARAM_DFLT => $wgDefaultGlobe, |
143 | 144 | ), |
| 145 | + 'namespace' => array( |
| 146 | + ApiBase::PARAM_TYPE => 'namespace', |
| 147 | + ApiBase::PARAM_DFLT => NS_MAIN, |
| 148 | + ApiBase::PARAM_ISMULTI => true, |
| 149 | + ) |
144 | 150 | ); |
145 | 151 | } |
146 | 152 | |
— | — | @@ -149,9 +155,10 @@ |
150 | 156 | 'coord' => 'Coordinate around which to search: two floating-point values separated by pipe (|)', |
151 | 157 | 'page' => 'Page around which to search', |
152 | 158 | 'radius' => 'Search radius in meters', |
153 | | - 'maxdim' => 'Restrict search to onjects no larger than this, in meters', |
| 159 | + 'maxdim' => 'Restrict search to objects no larger than this, in meters', |
154 | 160 | 'limit' => 'Maximum number of pages to return', |
155 | 161 | 'globe' => "Globe to search on (by default `{$wgDefaultGlobe}')", |
| 162 | + 'namespace' => 'Namespace(s) to search', |
156 | 163 | ); |
157 | 164 | } |
158 | 165 | |