TopicSubscriptions: Hide broken "Topic" sort

This doesn't sort by the topic name, but the hidden
sub_id field, leading to a confusing order.

Bug: T273342
Change-Id: I6146abf05544d40c9ef0d2e8c58d020e5a5fa8a2
This commit is contained in:
Ed Sanders 2021-10-12 14:04:59 +01:00
parent 0935bb1271
commit 7550bb4395

View file

@ -148,6 +148,7 @@ class TopicSubscriptionsPager extends TablePager {
* @inheritDoc
*/
protected function isFieldSortable( $field ) {
return isset( self::INDEX_FIELDS[$field] );
// Topic is set to the auto-ID field (sub_id), so sorting by it is not very useful
return isset( self::INDEX_FIELDS[$field] ) && $field !== '_topic';
}
}