mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Merge "Standardize the order of options in dropdown filters for search"
This commit is contained in:
commit
6bf5e2ce6f
|
@ -85,6 +85,7 @@
|
|||
"abusefilter-log-details-ip": "Originating IP address",
|
||||
"abusefilter-log-details-checkuser": "Check user",
|
||||
"abusefilter-log-noactions": "none",
|
||||
"abusefilter-log-noactions-filter": "None",
|
||||
"abusefilter-log-details-diff": "Changes made in edit",
|
||||
"abusefilter-log-linkoncontribs": "abuse log",
|
||||
"abusefilter-log-linkoncontribs-text": "Abuse log for {{GENDER:$1|this user}}",
|
||||
|
|
|
@ -123,6 +123,7 @@
|
|||
"abusefilter-log-details-ip": "Row label in private log details.",
|
||||
"abusefilter-log-details-checkuser": "Text to use as link to [[Special:Checkuser]] for the given IP.\n{{Identical|Check user}}",
|
||||
"abusefilter-log-noactions": "Text displayed in Special:AbuseLog when a rule was triggered, but no action was taken.\n{{Identical|None}}",
|
||||
"abusefilter-log-noactions-filter": "Text displayed in the dropdown menu on Special:AbuseLog when a user tries fo filter the logs for those where a rule was triggered, but no action was taken.\n{{Identical|None}}",
|
||||
"abusefilter-log-details-diff": "Header for differences between two edits in log details.",
|
||||
"abusefilter-log-linkoncontribs": "Link text added on [[Special:Contributions]] and other relevant special pages.\n{{Identical|Abuse log}}",
|
||||
"abusefilter-log-linkoncontribs-text": "Title for link added on [[Special:Contributions]] and other relevant special pages. Parameters:\n* $1 is the target user name used for GENDER.",
|
||||
|
|
|
@ -243,23 +243,29 @@ class SpecialAbuseLog extends AbuseFilterSpecialPage {
|
|||
];
|
||||
$filterableActions = $this->getAllFilterableActions();
|
||||
$actions = array_combine( $filterableActions, $filterableActions );
|
||||
$actions[ $this->msg( 'abusefilter-log-search-action-other' )->text() ] = 'other';
|
||||
$actions[ $this->msg( 'abusefilter-log-search-action-any' )->text() ] = 'any';
|
||||
ksort( $actions );
|
||||
$actions = array_merge(
|
||||
[ $this->msg( 'abusefilter-log-search-action-any' )->text() => 'any' ],
|
||||
$actions,
|
||||
[ $this->msg( 'abusefilter-log-search-action-other' )->text() => 'other' ]
|
||||
);
|
||||
$formDescriptor['SearchAction'] = [
|
||||
'label-message' => 'abusefilter-log-search-action-label',
|
||||
'type' => 'select',
|
||||
'options' => $actions,
|
||||
'default' => 'any',
|
||||
];
|
||||
$options = [
|
||||
$this->msg( 'abusefilter-log-noactions' )->text() => 'noactions',
|
||||
$this->msg( 'abusefilter-log-search-action-taken-any' )->text() => '',
|
||||
];
|
||||
$options = [];
|
||||
foreach ( $this->getAllActions() as $action ) {
|
||||
$key = AbuseFilter::getActionDisplay( $action );
|
||||
$options[$key] = $action;
|
||||
}
|
||||
ksort( $options );
|
||||
$options = array_merge(
|
||||
[ $this->msg( 'abusefilter-log-search-action-taken-any' )->text() => '' ],
|
||||
$options,
|
||||
[ $this->msg( 'abusefilter-log-noactions-filter' )->text() => 'noactions' ]
|
||||
);
|
||||
$formDescriptor['SearchActionTaken'] = [
|
||||
'label-message' => 'abusefilter-log-search-action-taken-label',
|
||||
'type' => 'select',
|
||||
|
|
Loading…
Reference in a new issue