Merge "Add separate abusefilter-log-search-filter-help-central message"

This commit is contained in:
jenkins-bot 2020-09-18 07:55:02 +00:00 committed by Gerrit Code Review
commit 36a0f41873
6 changed files with 12 additions and 4 deletions

View file

@ -47,6 +47,7 @@
"apihelp-query+abuselog-param-user": "Show only entries done by a given user or IP address.",
"apihelp-query+abuselog-param-title": "Show only entries occurring on a given page.",
"apihelp-query+abuselog-param-filter": "Show only entries that were caught by the given filter IDs. Separate with pipes, prefix with \"$1\" for global filters.",
"apihelp-query+abuselog-param-filter-central": "Show only entries that were caught by the given filter IDs. Separate with pipes.",
"apihelp-query+abuselog-param-limit": "The maximum amount of entries to list.",
"apihelp-query+abuselog-param-prop": "Which properties to get.",
"apihelp-query+abuselog-param-wiki": "Wiki to show hits from.",

View file

@ -78,7 +78,8 @@
"apihelp-query+abuselog-param-end": "{{doc-apihelp-param|query+abuselog|end}}",
"apihelp-query+abuselog-param-user": "{{doc-apihelp-param|query+abuselog|user}}",
"apihelp-query+abuselog-param-title": "{{doc-apihelp-param|query+abuselog|title}}",
"apihelp-query+abuselog-param-filter": "{{doc-apihelp-param|query+abuselog|filter}}\nParameters:\n* $1 - The prefix to use for global filters.",
"apihelp-query+abuselog-param-filter": "{{doc-apihelp-param|query+abuselog|filter}}\nParameters:\n* $1 - The prefix to use for global filters.\n\nSee also {{msg-mw|apihelp-query+abuselog-param-filter-central}}",
"apihelp-query+abuselog-param-filter-central": "{{doc-apihelp-param|query+abuselog|filter}}\n\nSee also {{msg-mw|apihelp-query+abuselog-param-filter}}",
"apihelp-query+abuselog-param-limit": "{{doc-apihelp-param|query+abuselog|limit}}",
"apihelp-query+abuselog-param-prop": "{{doc-apihelp-param|query+abuselog|prop}}",
"apihelp-query+abuselog-param-wiki": "{{doc-apihelp-param|query+abuselog|wiki}}",

View file

@ -53,6 +53,7 @@
"abusefilter-log-search-group-any": "Any",
"abusefilter-log-search-filter": "Filter IDs:",
"abusefilter-log-search-filter-help": "Separate with pipes, prefix with \"$1\" for global filters",
"abusefilter-log-search-filter-help-central": "Separate with pipes",
"abusefilter-log-search-title": "Title:",
"abusefilter-log-search-wiki": "Wiki:",
"abusefilter-log-search-impact": "Impact:",

View file

@ -90,7 +90,8 @@
"abusefilter-log-search-group": "Field label in abuse filter log page.",
"abusefilter-log-search-group-any": "Option allowing to find entries from any group in abuse log.\n{{Identical|Any}}",
"abusefilter-log-search-filter": "Field label in abuse filter log page.",
"abusefilter-log-search-filter-help": "Help text, see {{msg-mw|abusefilter-log-search-filter}}. Parameters:\n* $1 - The prefix used by global filters",
"abusefilter-log-search-filter-help": "Help text, see {{msg-mw|abusefilter-log-search-filter}}. Parameters:\n* $1 - The prefix used by global filters.\n\nSee also {{msg-mw|abusefilter-log-search-filter-help-central}}",
"abusefilter-log-search-filter-help-central": "Help text, see {{msg-mw|abusefilter-log-search-filter}}.\n\nSee also {{msg-mw|abusefilter-log-search-filter-help}}",
"abusefilter-log-search-title": "Field label in abuse filter log page.\n{{Identical|Title}}",
"abusefilter-log-search-wiki": "Label for text field that allows the user to limit search results to a specific wiki, by name.\n{{Identical|Wiki}}",
"abusefilter-log-search-impact": "Label for options allowing to filter abuse log by whether the action was actually saved.\n{{Identical|Impact}}",

View file

@ -304,6 +304,7 @@ class ApiQueryAbuseLog extends ApiQueryBase {
];
$params['prop'][ApiBase::PARAM_DFLT] .= '|wiki';
$params['prop'][ApiBase::PARAM_TYPE][] = 'wiki';
$params['filter'][ApiBase::PARAM_HELP_MSG] = 'apihelp-query+abuselog-param-filter-central';
}
return $params;
}

View file

@ -298,12 +298,15 @@ class SpecialAbuseLog extends AbuseFilterSpecialPage {
}
if ( self::canSeeDetails( $user ) ) {
$helpmsg = $this->getConfig()->get( 'AbuseFilterIsCentral' )
? $this->msg( 'abusefilter-log-search-filter-help' )
->params( AbuseFilter::GLOBAL_FILTER_PREFIX )->escaped()
: $this->msg( 'abusefilter-log-search-filter-help-central' )->escaped();
$formDescriptor['SearchFilter'] = [
'label-message' => 'abusefilter-log-search-filter',
'type' => 'text',
'default' => $this->mSearchFilter,
'help' => $this->msg( 'abusefilter-log-search-filter-help' )
->params( AbuseFilter::GLOBAL_FILTER_PREFIX )->escaped()
'help' => $helpmsg
];
}
if ( $this->getConfig()->get( 'AbuseFilterIsCentral' ) ) {