Index: trunk/phase3/includes/api/ApiQueryCategoryMembers.php |
— | — | @@ -77,12 +77,15 @@ |
78 | 78 | $fld_ids = isset( $prop['ids'] ); |
79 | 79 | $fld_title = isset( $prop['title'] ); |
80 | 80 | $fld_sortkey = isset( $prop['sortkey'] ); |
| 81 | + $fld_sortkeyprefix = isset( $prop['sortkeyprefix'] ); |
81 | 82 | $fld_timestamp = isset( $prop['timestamp'] ); |
82 | 83 | $fld_type = isset( $prop['type'] ); |
83 | 84 | |
84 | 85 | if ( is_null( $resultPageSet ) ) { |
85 | | - $this->addFields( array( 'cl_from', 'cl_sortkey', 'page_namespace', 'page_title' ) ); |
| 86 | + $this->addFields( array( 'cl_from', 'page_namespace', 'page_title' ) ); |
86 | 87 | $this->addFieldsIf( 'page_id', $fld_ids ); |
| 88 | + $this->addFieldsIf( 'cl_sortkey_prefix', $fld_sortkeyprefix ); |
| 89 | + $this->addFieldsIf( 'cl_sortkey', $fld_sortkey ); |
87 | 90 | } else { |
88 | 91 | $this->addFields( $resultPageSet->getPageTableFields() ); // will include page_ id, ns, title |
89 | 92 | $this->addFields( array( 'cl_from', 'cl_sortkey' ) ); |
— | — | @@ -169,6 +172,9 @@ |
170 | 173 | if ( $fld_sortkey ) { |
171 | 174 | $vals['sortkey'] = $row->cl_sortkey; |
172 | 175 | } |
| 176 | + if ( $fld_sortkeyprefix ) { |
| 177 | + $vals['sortkeyprefix'] = $row->cl_sortkey_prefix; |
| 178 | + } |
173 | 179 | if ( $fld_type ) { |
174 | 180 | $vals['type'] = $row->cl_type; |
175 | 181 | } |
— | — | @@ -227,6 +233,7 @@ |
228 | 234 | 'ids', |
229 | 235 | 'title', |
230 | 236 | 'sortkey', |
| 237 | + 'sortkeyprefix', |
231 | 238 | 'type', |
232 | 239 | 'timestamp', |
233 | 240 | ) |
— | — | @@ -285,11 +292,12 @@ |
286 | 293 | 'pageid' => 'Page ID of the category to enumerate. Cannot be used together with cmtitle', |
287 | 294 | 'prop' => array( |
288 | 295 | 'What pieces of information to include', |
289 | | - ' ids - Adds the page ID', |
290 | | - ' title - Adds the title and namespace ID of the page', |
291 | | - ' sortkey - Adds the sortkey used for the category', |
292 | | - ' type - Adds the type that the page has been categorised as', |
293 | | - ' timestamp - Adds the timestamp of when the page was included', |
| 296 | + ' ids - Adds the page ID', |
| 297 | + ' title - Adds the title and namespace ID of the page', |
| 298 | + ' sortkey - Adds the sortkey used for the category (note, may be non human readable)', |
| 299 | + ' sortkeyprefix - Adds the sortkey prefix used for the category', |
| 300 | + ' type - Adds the type that the page has been categorised as', |
| 301 | + ' timestamp - Adds the timestamp of when the page was included', |
294 | 302 | ), |
295 | 303 | 'namespace' => 'Only include pages in these namespaces', |
296 | 304 | 'type' => 'What type of category members to include', |