$this->mLogEventsList = $list;
$this->limitType( $types ); // also excludes hidden types
+ $this->limitLogId( $logId );
+ $this->limitFilterTypes();
$this->limitPerformer( $performer );
$this->limitTitle( $title, $pattern );
$this->limitAction( $action );
$this->getDateCond( $year, $month, $day );
$this->mTagFilter = $tagFilter;
- $this->limitLogId( $logId );
$this->mDb = wfGetDB( DB_REPLICA, 'logpager' );
}
return $query;
}
- // Call ONLY after calling $this->limitType() already!
+ private function limitFilterTypes() {
+ if ( $this->hasEqualsClause( 'log_id' ) ) { // T220834
+ return;
+ }
+ $filterTypes = $this->getFilterParams();
+ foreach ( $filterTypes as $type => $hide ) {
+ if ( $hide ) {
+ $this->mConds[] = 'log_type != ' . $this->mDb->addQuotes( $type );
+ }
+ }
+ }
+
public function getFilterParams() {
global $wgFilterLogTypes;
$filters = [];
}
$filters[$type] = $hide;
- if ( $hide ) {
- $this->mConds[] = 'log_type != ' . $this->mDb->addQuotes( $type );
- }
}
return $filters;