mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 14:13:54 +00:00
Make more fields sortable and one conditionally
Users can now sort filters by whether they are visible and which group they belong to. Sorting by hit count is only possible if the user can actually see it. Change-Id: I516111f96b9ef0beaa0c04f902e03712591371d1
This commit is contained in:
parent
3e6605c94b
commit
95989575cc
|
@ -359,11 +359,15 @@ class AbuseFilterPager extends TablePager {
|
|||
$sortable_fields = array(
|
||||
'af_id',
|
||||
'af_enabled',
|
||||
'af_hit_count',
|
||||
'af_throttled',
|
||||
'af_user_text',
|
||||
'af_timestamp'
|
||||
'af_timestamp',
|
||||
'af_hidden',
|
||||
'af_group',
|
||||
);
|
||||
if ( $this->mPage->getUser()->isAllowed( 'abusefilter-log-detail' ) ) {
|
||||
$sortable_fields[] = 'af_hit_count';
|
||||
}
|
||||
return in_array( $name, $sortable_fields );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue