From e6b2491736a9549c984c0942d337fb46ea065be6 Mon Sep 17 00:00:00 2001 From: Melos Date: Sat, 10 Feb 2018 12:42:40 +0100 Subject: [PATCH] SpecialLog: Fix results when no offender is specified With 467ee1e82f15 offender is not ignored when it's a nonexistent username and a empty list is showed. Ignore offender search when no offender is specified. Bug: T186950 Change-Id: I93c9dafc9299d0ba1d01090471c5b49dcc904fe8 --- includes/specials/SpecialLog.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/specials/SpecialLog.php b/includes/specials/SpecialLog.php index de3fd19288..10f4864cb9 100644 --- a/includes/specials/SpecialLog.php +++ b/includes/specials/SpecialLog.php @@ -82,7 +82,7 @@ class SpecialLog extends SpecialPage { if ( $offender ) { if ( $offender->getId() > 0 ) { $qc = [ 'ls_field' => 'target_author_id', 'ls_value' => $offender->getId() ]; - } else { + } elseif ( empty( $opts->getValue( 'offender' ) ) === false ) { $qc = [ 'ls_field' => 'target_author_ip', 'ls_value' => $offender->getName() ]; } } -- 2.20.1