diff --git a/api/ApiQueryAbuseLog.php b/api/ApiQueryAbuseLog.php index db77fac39..d0d43f912 100644 --- a/api/ApiQueryAbuseLog.php +++ b/api/ApiQueryAbuseLog.php @@ -159,8 +159,11 @@ class ApiQueryAbuseLog extends ApiQueryBase { 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 b934973ec..db425d3fa 100644 --- a/special/SpecialAbuseLog.php +++ b/special/SpecialAbuseLog.php @@ -88,7 +88,7 @@ class SpecialAbuseLog extends SpecialPage { $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 @@ class SpecialAbuseLog extends SpecialPage { return; } - $output = ''; - - $output .= Xml::element( + $output = Xml::element( 'legend', null, $this->msg( 'abusefilter-log-details-legend', $id )->text()