Index: trunk/phase3/includes/api/ApiQueryAllCategories.php |
— | — | @@ -69,6 +69,10 @@ |
70 | 70 | $to = ( is_null( $params['to'] ) ? null : $this->titlePartToKey( $params['to'] ) ); |
71 | 71 | $this->addWhereRange( 'cat_title', $dir, $from, $to ); |
72 | 72 | |
| 73 | + $min = $params['minpage']; |
| 74 | + $max = $params['maxpage']; |
| 75 | + $this->addWhereRange( 'cat_pages', $dir, $min, $max ); |
| 76 | + |
73 | 77 | if ( isset( $params['prefix'] ) ) { |
74 | 78 | $this->addWhere( 'cat_title' . $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) ); |
75 | 79 | } |
— | — | @@ -148,6 +152,14 @@ |
149 | 153 | 'descending' |
150 | 154 | ), |
151 | 155 | ), |
| 156 | + 'minpage' => array( |
| 157 | + ApiBase::PARAM_DFLT => null, |
| 158 | + ApiBase::PARAM_TYPE => 'integer' |
| 159 | + ), |
| 160 | + 'maxpage' => array( |
| 161 | + ApiBase::PARAM_DFLT => null, |
| 162 | + ApiBase::PARAM_TYPE => 'integer' |
| 163 | + ), |
152 | 164 | 'limit' => array( |
153 | 165 | ApiBase::PARAM_DFLT => 10, |
154 | 166 | ApiBase::PARAM_TYPE => 'limit', |
— | — | @@ -169,6 +181,8 @@ |
170 | 182 | 'to' => 'The category to stop enumerating at', |
171 | 183 | 'prefix' => 'Search for all category titles that begin with this value', |
172 | 184 | 'dir' => 'Direction to sort in', |
| 185 | + 'minpage' => 'Minimum number of category page members', |
| 186 | + 'maxpage' => 'Maximum number of category page members', |
173 | 187 | 'limit' => 'How many categories to return', |
174 | 188 | 'prop' => array( |
175 | 189 | 'Which properties to get', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -248,6 +248,7 @@ |
249 | 249 | in auto generated document, as it is on mw.org |
250 | 250 | * (bug 27182) API: Add filter by prefix for meta=allmessages |
251 | 251 | * (bug 27183) API: Add filter by customisation state for meta=allmessages |
| 252 | +* (bug 27340) API: Allow listing of "small" categories |
252 | 253 | |
253 | 254 | === Languages updated in 1.18 === |
254 | 255 | |