diff --git a/includes/logging/LogPager.php b/includes/logging/LogPager.php index 6aa48bccd12..da3380d1fb3 100644 --- a/includes/logging/LogPager.php +++ b/includes/logging/LogPager.php @@ -145,11 +145,15 @@ class LogPager extends ReverseChronologicalPager { return; } $filterTypes = $this->getFilterParams(); + $excludeTypes = []; foreach ( $filterTypes as $type => $hide ) { if ( $hide ) { - $this->mConds[] = 'log_type != ' . $this->mDb->addQuotes( $type ); + $excludeTypes[] = $type; } } + if ( $excludeTypes ) { + $this->mConds[] = $this->mDb->expr( 'log_type', '!=', $excludeTypes ); + } } public function getFilterParams() {