- # TODO: This is kind of wrong, because someone might set a sort
- # key prefix that's the same as the default sortkey for the
- # title. This should be fixed by refactoring code to replace
- # $sortkey in this array by a prefix, but it's basically harmless
- # (Title::moveTo() has had the same issue for a long time).
- if ( $this->mTitle->getCategorySortkey() == $sortkey ) {
- $prefix = '';
- $sortkey = Collation::singleton()->getSortKey( $sortkey );
- } else {
- # Treat custom sortkeys as a prefix, so that if multiple
- # things are forced to sort as '*' or something, they'll
- # sort properly in the category rather than in page_id
- # order or such.
- $prefix = $sortkey;
- $sortkey = Collation::singleton()->getSortKey(
- $this->mTitle->getCategorySortkey( $prefix ) );
- }
+ # Treat custom sortkeys as a prefix, so that if multiple
+ # things are forced to sort as '*' or something, they'll
+ # sort properly in the category rather than in page_id
+ # order or such.
+ $sortkey = Collation::singleton()->getSortKey(
+ $this->mTitle->getCategorySortkey( $prefix ) );