X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Flogging%2FLogPager.php;h=781df06f491b60df678960f1bac5f83914c03b29;hb=af80076034fb734d652eb043c523c1d8df974e51;hp=47aed56a641cf0b724f3ba43f07cbbec6bcff649;hpb=fd1ad3a51504d71df2a3f57302eb94db5f4ec18a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/logging/LogPager.php b/includes/logging/LogPager.php index 47aed56a64..781df06f49 100644 --- a/includes/logging/LogPager.php +++ b/includes/logging/LogPager.php @@ -53,6 +53,12 @@ class LogPager extends ReverseChronologicalPager { /** @var bool */ private $actionRestrictionsEnforced = false; + /** @var array */ + private $mConds; + + /** @var string */ + private $mTagFilter; + /** @var LogEventsList */ public $mLogEventsList; @@ -80,12 +86,13 @@ class LogPager extends ReverseChronologicalPager { $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' ); } @@ -101,7 +108,18 @@ class LogPager extends ReverseChronologicalPager { 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 = []; @@ -121,9 +139,6 @@ class LogPager extends ReverseChronologicalPager { } $filters[$type] = $hide; - if ( $hide ) { - $this->mConds[] = 'log_type != ' . $this->mDb->addQuotes( $type ); - } } return $filters;