jenkins-bot has submitted this change and it was merged.
Change subject: Make global AbuseFilters searchable on Special:AbuseLog
......................................................................
Make global AbuseFilters searchable on Special:AbuseLog
Global AbuseFilters will be searchable using "global-123"
with this. Furthermore this patch fixes the visibility of
global AbuseFilter ids within the API module.
Bug: 51007
Change-Id: Ia6caba5ae3d727b778076ecdba500b4dc1d55b6f
---
M api/ApiQueryAbuseLog.php
M special/SpecialAbuseLog.php
2 files changed, 7 insertions(+), 6 deletions(-)
Approvals:
CSteipp: Looks good to me, approved
jenkins-bot: Verified
diff --git a/api/ApiQueryAbuseLog.php b/api/ApiQueryAbuseLog.php
index db77fac..d0d43f9 100644
--- a/api/ApiQueryAbuseLog.php
+++ b/api/ApiQueryAbuseLog.php
@@ -159,8 +159,11 @@
if ( $fld_ids ) {
$entry['id'] = intval( $row->afl_id );
$entry['filter_id'] = '';
- if ( !AbuseFilter::filterHidden(
$row->afl_filter ) || SpecialAbuseLog::canSeeHidden() ) {
- $entry['filter_id'] = intval(
$row->afl_filter );
+ if ( !AbuseFilter::filterHidden(
$row->afl_filter )
+ || AbuseFilterView::canViewPrivate()
+ || $this->getUser()->isAllowed(
'abusefilter-log-private' )
+ ) {
+ $entry['filter_id'] = $row->afl_filter;
}
}
if ( $fld_filter ) {
diff --git a/special/SpecialAbuseLog.php b/special/SpecialAbuseLog.php
index b934973..db425d3 100644
--- a/special/SpecialAbuseLog.php
+++ b/special/SpecialAbuseLog.php
@@ -88,7 +88,7 @@
$this->mSearchTitle = $request->getText( 'wpSearchTitle' );
$this->mSearchFilter = null;
if ( self::canSeeDetails() ) {
- $this->mSearchFilter = $request->getIntOrNull(
'wpSearchFilter' );
+ $this->mSearchFilter = $request->getText(
'wpSearchFilter' );
}
}
@@ -288,9 +288,7 @@
return;
}
- $output = '';
-
- $output .= Xml::element(
+ $output = Xml::element(
'legend',
null,
$this->msg( 'abusefilter-log-details-legend', $id
)->text()
--
To view, visit https://gerrit.wikimedia.org/r/72856
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6caba5ae3d727b778076ecdba500b4dc1d55b6f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: CSteipp <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits