mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 14:13:54 +00:00
API: Fix "Undefined index: wiki" warnings
Bug: T186914 Change-Id: I7e9d5524302f5f90d0e82f0f4d41a542e2990ed5
This commit is contained in:
parent
60130eb925
commit
2633839630
|
@ -140,8 +140,10 @@ class ApiQueryAbuseLog extends ApiQueryBase {
|
|||
|
||||
$this->addWhereIf( [ 'afl_filter' => $params['filter'] ], isset( $params['filter'] ) );
|
||||
$this->addWhereIf( $notDeletedCond, !SpecialAbuseLog::canSeeHidden( $user ) );
|
||||
$this->addWhereIf( [ 'afl_wiki' => $params['wiki'] ],
|
||||
$wgAbuseFilterIsCentral && isset( $params['wiki'] ) );
|
||||
if ( isset( $params['wiki'] ) ) {
|
||||
// 'wiki' won't be set if $wgAbuseFilterIsCentral = false
|
||||
$this->addWhereIf( [ 'afl_wiki' => $params['wiki'] ], $wgAbuseFilterIsCentral );
|
||||
}
|
||||
|
||||
$title = $params['title'];
|
||||
if ( !is_null( $title ) ) {
|
||||
|
|
Loading…
Reference in a new issue