mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 23:40:19 +00:00
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
This commit is contained in:
parent
2fcb9e51df
commit
d2a342788f
|
@ -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 ) {
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue