* else use sortkey...
*
* @param Title $title
- * @param string $sortkey
+ * @param string $sortkey The human-readable sortkey (before transforming to icu or whatever).
*/
function getSubcategorySortChar( $title, $sortkey ) {
global $wgContLang;
$count = 0;
foreach ( $res as $row ) {
$title = Title::newFromRow( $row );
- $rawSortkey = $row->cl_sortkey;
+ $humanSortkey = $title->getCategorySortkey( $row->cl_sortkey_prefix );
if ( ++$count > $this->limit ) {
# We've reached the one extra which shows that there
# are additional pages to be had. Stop here...
- $this->nextPage[$type] = $rawSortkey;
+ $this->nextPage[$type] = $humanSortkey;
break;
}
if ( $title->getNamespace() == NS_CATEGORY ) {
$cat = Category::newFromRow( $row, $title );
- $this->addSubcategoryObject( $cat, $rawSortkey, $row->page_len );
+ $this->addSubcategoryObject( $cat, $humanSortkey, $row->page_len );
} elseif ( $title->getNamespace() == NS_FILE ) {
- $this->addImage( $title, $rawSortkey, $row->page_len, $row->page_is_redirect );
+ $this->addImage( $title, $humanSortkey, $row->page_len, $row->page_is_redirect );
} else {
- $this->addPage( $title, $rawSortkey, $row->page_len, $row->page_is_redirect );
+ $this->addPage( $title, $humanSortkey, $row->page_len, $row->page_is_redirect );
}
}
}