From: Melos Date: Sat, 10 Feb 2018 11:42:40 +0000 (+0100) Subject: SpecialLog: Fix results when no offender is specified X-Git-Tag: 1.31.0-rc.0~639 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=e6b2491736a9549c984c0942d337fb46ea065be6;p=lhc%2Fweb%2Fwiklou.git 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 --- 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() ]; } }