jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/368362 )
Change subject: Allow searching for visible-only/hidden-only/both on abuselog
entries
..
Allow searching for visible-only/hidden-only/both on abuselog entries
Bug: T153065
Change-Id: I44ca86ff8564328ae932ccad9675298b686dc6ab
---
M i18n/en.json
M i18n/qqq.json
M includes/special/SpecialAbuseLog.php
3 files changed, 31 insertions(+), 0 deletions(-)
Approvals:
Matěj Suchánek: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/i18n/en.json b/i18n/en.json
index be06bcf..a967cd3 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -47,6 +47,10 @@
"abusefilter-log-search-filter": "Filter IDs (separate with pipes):",
"abusefilter-log-search-title": "Title:",
"abusefilter-log-search-wiki": "Wiki:",
+ "abusefilter-log-search-entries-label": "Visibility:",
+ "abusefilter-log-search-entries-all": "All entries",
+ "abusefilter-log-search-entries-hidden": "Hidden entries only",
+ "abusefilter-log-search-entries-visible": "Visible entries only",
"abusefilter-log-search-submit": "Search",
"abusefilter-log-entry": "$1: $2 {{GENDER:$8|triggered}} an abuse
filter, {{GENDER:$8|performing}} the action \"$3\" on $4.\nActions taken:
$5;\nFilter description: $6",
"abusefilter-log-entry-withdiff": "$1: $2 {{GENDER:$8|triggered}} an
abuse filter, {{GENDER:$8|performing}} the action \"$3\" on $4.\nActions taken:
$5;\nFilter description: $6 ($7)",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index ed2698b..7769374 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -78,6 +78,10 @@
"abusefilter-log-search-filter": "Field label in abuse filter log
page.",
"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-entries-label": "Label for options allowing to
find entries with specified visibility.",
+ "abusefilter-log-search-entries-all": "Option allowing to find all
entries in abuse log.",
+ "abusefilter-log-search-entries-hidden": "Option allowing to find
hidden entries only in abuse log.",
+ "abusefilter-log-search-entries-visible": "Option allowing to find
visible entries only in abuse log.",
"abusefilter-log-search-submit": "Button text to search log in abuse
filter log page.\n{{Identical|Search}}",
"abusefilter-log-entry": "This message is for a log entry.
Parameters:\n* $1 - timestamp\n* $2 - user\n* $3 - action by user\n* $4 - link
to page the action that triggered the filter was made on\n* $5 - actions taken
by the filter\n* $6 - comments in filter description\n* $8 - raw username, for
GENDER support\n{{Related|Abusefilter-log}}",
"abusefilter-log-entry-withdiff": "This message is for a log entry.
Parameters:\n* $1 - timestamp\n* $2 - user\n* $3 - action by user\n* $4 - link
to page the action that triggered the filter was made on\n* $5 - actions taken
by the filter\n* $6 - comments in filter description\n* $7 - link to diff\n* $8
- raw username, for GENDER support\n{{Related|Abusefilter-log}}",
diff --git a/includes/special/SpecialAbuseLog.php
b/includes/special/SpecialAbuseLog.php
index 853424b..61b60c5 100644
--- a/includes/special/SpecialAbuseLog.php
+++ b/includes/special/SpecialAbuseLog.php
@@ -15,6 +15,8 @@
protected $mSearchFilter;
+ protected $mSearchEntries;
+
public function __construct() {
parent::__construct( 'AbuseLog', 'abusefilter-log' );
}
@@ -95,6 +97,8 @@
if ( self::canSeeDetails() ) {
$this->mSearchFilter = $request->getText(
'wpSearchFilter' );
}
+
+ $this->mSearchEntries = $request->getText( 'wpSearchEntries' );
}
function searchForm() {
@@ -130,6 +134,17 @@
'type' => 'text',
'default' => $this->mSearchWiki,
'size' => 45,
+ ];
+ }
+ if ( self::canSeeHidden() ) {
+ $formDescriptor['SearchEntries'] = [
+ 'type' => 'select',
+ 'label-message' =>
'abusefilter-log-search-entries-label',
+ 'options' => [
+ $this->msg(
'abusefilter-log-search-entries-all' )->text() => 0,
+ $this->msg(
'abusefilter-log-search-entries-hidden' )->text() => 1,
+ $this->msg(
'abusefilter-log-search-entries-visible' )->text() => 2,
+ ],